29 #include "../../include/output/COutputLegacy.hpp" 31 #include "../../../Common/include/geometry_structure.hpp" 32 #include "../../include/solver_structure.hpp" 39 unsigned short iDim, iZone, iSpan, iMarker;
54 nGlobal_BoundTria = 0;
55 nGlobal_BoundQuad = 0;
60 Conn_Line = NULL; Conn_BoundTria = NULL; Conn_BoundQuad = NULL;
61 Conn_Tria = NULL; Conn_Quad = NULL; Conn_Tetr = NULL;
62 Conn_Hexa = NULL; Conn_Pris = NULL; Conn_Pyra = NULL;
69 nGlobal_Surf_Poin = 0;
80 nParallel_BoundTria = 0;
81 nParallel_BoundQuad = 0;
85 Conn_BoundLine_Par = NULL; Conn_BoundTria_Par = NULL; Conn_BoundQuad_Par = NULL;
86 Conn_Tria_Par = NULL; Conn_Quad_Par = NULL; Conn_Tetr_Par = NULL;
87 Conn_Hexa_Par = NULL; Conn_Pris_Par = NULL; Conn_Pyra_Par = NULL;
90 Local_Data_Copy = NULL;
92 Parallel_Surf_Data = NULL;
96 nGlobalPoint_Sort = 0;
100 Local_Halo_Sort = NULL;
106 nPointCumulative = NULL;
110 wrote_base_file =
false;
114 wrote_CGNS_base =
false;
118 wrote_surf_file =
false;
122 wrote_Paraview_base =
false;
128 for (iZone = 0; iZone < config->
GetnZone(); iZone++) RhoRes_Old[iZone] =
EPS;
130 wrote_Paraview_base =
false;
141 TotalStaticEfficiency =
new su2double*[nMarkerTurboPerf];
142 TotalTotalEfficiency =
new su2double*[nMarkerTurboPerf];
143 KineticEnergyLoss =
new su2double*[nMarkerTurboPerf];
144 TRadius =
new su2double*[nMarkerTurboPerf];
145 TotalPressureLoss =
new su2double*[nMarkerTurboPerf];
146 MassFlowIn =
new su2double*[nMarkerTurboPerf];
147 MassFlowOut =
new su2double*[nMarkerTurboPerf];
148 FlowAngleIn =
new su2double*[nMarkerTurboPerf];
149 FlowAngleIn_BC =
new su2double*[nMarkerTurboPerf];
150 FlowAngleOut =
new su2double*[nMarkerTurboPerf];
151 EulerianWork =
new su2double*[nMarkerTurboPerf];
152 TotalEnthalpyIn =
new su2double*[nMarkerTurboPerf];
153 TotalEnthalpyIn_BC =
new su2double*[nMarkerTurboPerf];
154 EntropyIn =
new su2double*[nMarkerTurboPerf];
155 EntropyOut =
new su2double*[nMarkerTurboPerf];
156 EntropyIn_BC =
new su2double*[nMarkerTurboPerf];
157 PressureRatio =
new su2double*[nMarkerTurboPerf];
158 TotalTemperatureIn =
new su2double*[nMarkerTurboPerf];
159 EnthalpyOut =
new su2double*[nMarkerTurboPerf];
160 MachIn =
new su2double**[nMarkerTurboPerf];
161 MachOut =
new su2double**[nMarkerTurboPerf];
162 VelocityOutIs =
new su2double*[nMarkerTurboPerf];
163 DensityIn =
new su2double*[nMarkerTurboPerf];
164 PressureIn =
new su2double*[nMarkerTurboPerf];
165 TurboVelocityIn =
new su2double**[nMarkerTurboPerf];
166 DensityOut =
new su2double*[nMarkerTurboPerf];
167 PressureOut =
new su2double*[nMarkerTurboPerf];
168 TurboVelocityOut =
new su2double**[nMarkerTurboPerf];
169 EnthalpyOutIs =
new su2double*[nMarkerTurboPerf];
170 EntropyGen =
new su2double*[nMarkerTurboPerf];
171 AbsFlowAngleIn =
new su2double*[nMarkerTurboPerf];
172 TotalEnthalpyOut =
new su2double*[nMarkerTurboPerf];
173 TotalEnthalpyOutIs =
new su2double*[nMarkerTurboPerf];
174 RothalpyIn =
new su2double*[nMarkerTurboPerf];
175 RothalpyOut =
new su2double*[nMarkerTurboPerf];
176 AbsFlowAngleOut =
new su2double*[nMarkerTurboPerf];
177 PressureOut_BC =
new su2double*[nMarkerTurboPerf];
178 TemperatureIn =
new su2double*[nMarkerTurboPerf];
179 TemperatureOut =
new su2double*[nMarkerTurboPerf];
180 TotalPressureIn =
new su2double*[nMarkerTurboPerf];
181 TotalPressureOut =
new su2double*[nMarkerTurboPerf];
182 TotalTemperatureOut =
new su2double*[nMarkerTurboPerf];
183 EnthalpyIn =
new su2double*[nMarkerTurboPerf];
184 TurbIntensityIn =
new su2double*[nMarkerTurboPerf];
185 Turb2LamViscRatioIn =
new su2double*[nMarkerTurboPerf];
186 TurbIntensityOut =
new su2double*[nMarkerTurboPerf];
187 Turb2LamViscRatioOut =
new su2double*[nMarkerTurboPerf];
188 NuFactorIn =
new su2double*[nMarkerTurboPerf];
189 NuFactorOut =
new su2double*[nMarkerTurboPerf];
191 for (iMarker = 0; iMarker < nMarkerTurboPerf; iMarker++){
192 TotalStaticEfficiency [iMarker] =
new su2double [nSpanWiseSections + 1];
193 TotalTotalEfficiency [iMarker] =
new su2double [nSpanWiseSections + 1];
194 KineticEnergyLoss [iMarker] =
new su2double [nSpanWiseSections + 1];
195 TRadius [iMarker] =
new su2double [nSpanWiseSections + 1];
196 TotalPressureLoss [iMarker] =
new su2double [nSpanWiseSections + 1];
197 MassFlowIn [iMarker] =
new su2double [nSpanWiseSections + 1];
198 MassFlowOut [iMarker] =
new su2double [nSpanWiseSections + 1];
199 FlowAngleIn [iMarker] =
new su2double [nSpanWiseSections + 1];
200 FlowAngleIn_BC [iMarker] =
new su2double [nSpanWiseSections + 1];
201 FlowAngleOut [iMarker] =
new su2double [nSpanWiseSections + 1];
202 EulerianWork [iMarker] =
new su2double [nSpanWiseSections + 1];
203 TotalEnthalpyIn [iMarker] =
new su2double [nSpanWiseSections + 1];
204 TotalEnthalpyIn_BC [iMarker] =
new su2double [nSpanWiseSections + 1];
205 EntropyIn [iMarker] =
new su2double [nSpanWiseSections + 1];
206 EntropyOut [iMarker] =
new su2double [nSpanWiseSections + 1];
207 EntropyIn_BC [iMarker] =
new su2double [nSpanWiseSections + 1];
208 PressureRatio [iMarker] =
new su2double [nSpanWiseSections + 1];
209 TotalTemperatureIn [iMarker] =
new su2double [nSpanWiseSections + 1];
210 EnthalpyOut [iMarker] =
new su2double [nSpanWiseSections + 1];
211 MachIn [iMarker] =
new su2double*[nSpanWiseSections + 1];
212 MachOut [iMarker] =
new su2double*[nSpanWiseSections + 1];
213 VelocityOutIs [iMarker] =
new su2double [nSpanWiseSections + 1];
214 DensityIn [iMarker] =
new su2double [nSpanWiseSections + 1];
215 PressureIn [iMarker] =
new su2double [nSpanWiseSections + 1];
216 TurboVelocityIn [iMarker] =
new su2double*[nSpanWiseSections + 1];
217 DensityOut [iMarker] =
new su2double [nSpanWiseSections + 1];
218 PressureOut [iMarker] =
new su2double [nSpanWiseSections + 1];
219 TurboVelocityOut [iMarker] =
new su2double*[nSpanWiseSections + 1];
220 EnthalpyOutIs [iMarker] =
new su2double [nSpanWiseSections + 1];
221 EntropyGen [iMarker] =
new su2double [nSpanWiseSections + 1];
222 AbsFlowAngleIn [iMarker] =
new su2double [nSpanWiseSections + 1];
223 TotalEnthalpyOut [iMarker] =
new su2double [nSpanWiseSections + 1];
224 TotalEnthalpyOutIs [iMarker] =
new su2double [nSpanWiseSections + 1];
225 RothalpyIn [iMarker] =
new su2double [nSpanWiseSections + 1];
226 RothalpyOut [iMarker] =
new su2double [nSpanWiseSections + 1];
227 AbsFlowAngleOut [iMarker] =
new su2double [nSpanWiseSections + 1];
228 PressureOut_BC [iMarker] =
new su2double [nSpanWiseSections + 1];
229 TemperatureIn [iMarker] =
new su2double [nSpanWiseSections + 1];
230 TemperatureOut [iMarker] =
new su2double [nSpanWiseSections + 1];
231 TotalPressureIn [iMarker] =
new su2double [nSpanWiseSections + 1];
232 TotalPressureOut [iMarker] =
new su2double [nSpanWiseSections + 1];
233 TotalTemperatureOut [iMarker] =
new su2double [nSpanWiseSections + 1];
234 EnthalpyIn [iMarker] =
new su2double [nSpanWiseSections + 1];
235 TurbIntensityIn [iMarker] =
new su2double [nSpanWiseSections + 1];
236 Turb2LamViscRatioIn [iMarker] =
new su2double [nSpanWiseSections + 1];
237 TurbIntensityOut [iMarker] =
new su2double [nSpanWiseSections + 1];
238 Turb2LamViscRatioOut [iMarker] =
new su2double [nSpanWiseSections + 1];
239 NuFactorIn [iMarker] =
new su2double [nSpanWiseSections + 1];
240 NuFactorOut [iMarker] =
new su2double [nSpanWiseSections + 1];
243 for (iSpan = 0; iSpan < nSpanWiseSections + 1; iSpan++){
244 TotalStaticEfficiency [iMarker][iSpan] = 0.0;
245 TotalTotalEfficiency [iMarker][iSpan] = 0.0;
246 KineticEnergyLoss [iMarker][iSpan] = 0.0;
247 TRadius [iMarker][iSpan] = 0.0;
248 TotalPressureLoss [iMarker][iSpan] = 0.0;
249 MassFlowIn [iMarker][iSpan] = 0.0;
250 MassFlowOut [iMarker][iSpan] = 0.0;
251 FlowAngleIn [iMarker][iSpan] = 0.0;
253 FlowAngleOut [iMarker][iSpan] = 0.0;
254 EulerianWork [iMarker][iSpan] = 0.0;
255 TotalEnthalpyIn [iMarker][iSpan] = 0.0;
256 TotalEnthalpyIn_BC [iMarker][iSpan] = 0.0;
257 EntropyIn [iMarker][iSpan] = 0.0;
258 EntropyOut [iMarker][iSpan] = 0.0;
259 EntropyIn_BC [iMarker][iSpan] = 0.0;
260 PressureRatio [iMarker][iSpan] = 0.0;
261 TotalTemperatureIn [iMarker][iSpan] = 0.0;
262 EnthalpyOut [iMarker][iSpan] = 0.0;
265 VelocityOutIs [iMarker][iSpan] = 0.0;
266 DensityIn [iMarker][iSpan] = 0.0;
267 PressureIn [iMarker][iSpan] = 0.0;
269 DensityOut [iMarker][iSpan] = 0.0;
270 PressureOut [iMarker][iSpan] = 0.0;
272 EnthalpyOutIs [iMarker][iSpan] = 0.0;
273 EntropyGen [iMarker][iSpan] = 0.0;
274 AbsFlowAngleIn [iMarker][iSpan] = 0.0;
275 TotalEnthalpyOut [iMarker][iSpan] = 0.0;
276 TotalEnthalpyOutIs [iMarker][iSpan] = 0.0;
277 RothalpyIn [iMarker][iSpan] = 0.0;
278 RothalpyOut [iMarker][iSpan] = 0.0;
279 AbsFlowAngleOut [iMarker][iSpan] = 0.0;
282 TemperatureIn [iMarker][iSpan] = 0.0;
283 TemperatureOut [iMarker][iSpan] = 0.0;
284 TotalPressureIn [iMarker][iSpan] = 0.0;
285 TotalPressureOut [iMarker][iSpan] = 0.0;
286 TotalTemperatureOut [iMarker][iSpan] = 0.0;
287 EnthalpyIn [iMarker][iSpan] = 0.0;
288 TurbIntensityIn [iMarker][iSpan] = 0.0;
289 Turb2LamViscRatioIn [iMarker][iSpan] = 0.0;
290 TurbIntensityOut [iMarker][iSpan] = 0.0;
291 Turb2LamViscRatioOut [iMarker][iSpan] = 0.0;
292 NuFactorIn [iMarker][iSpan] = 0.0;
293 NuFactorOut [iMarker][iSpan] = 0.0;
294 MachIn [iMarker][iSpan] =
new su2double[4];
295 MachOut [iMarker][iSpan] =
new su2double[4];
296 TurboVelocityIn [iMarker][iSpan] =
new su2double[4];
297 TurboVelocityOut [iMarker][iSpan] =
new su2double[4];
299 for (iDim = 0; iDim < 4; iDim++){
300 MachIn [iMarker][iSpan][iDim] = 0.0;
301 MachOut [iMarker][iSpan][iDim] = 0.0;
302 TurboVelocityIn [iMarker][iSpan][iDim] = 0.0;
303 TurboVelocityOut [iMarker][iSpan][iDim] = 0.0;
315 if (RhoRes_Old != NULL)
delete [] RhoRes_Old;
318 unsigned short iMarker, iSpan;
320 for(iMarker = 0; iMarker< nMarkerTurboPerf; iMarker++){
321 for(iSpan=0; iSpan<nSpanWiseSections+1; iSpan++){
322 delete [] MachIn [iMarker][iSpan];
323 delete [] MachOut [iMarker][iSpan];
324 delete [] TurboVelocityIn [iMarker][iSpan];
325 delete [] TurboVelocityOut[iMarker][iSpan];
328 for(iMarker = 0; iMarker< nMarkerTurboPerf; iMarker++){
329 delete [] TotalStaticEfficiency[iMarker];
330 delete [] TotalTotalEfficiency [iMarker];
331 delete [] KineticEnergyLoss [iMarker];
332 delete [] TRadius [iMarker];
333 delete [] TotalPressureLoss [iMarker];
334 delete [] MassFlowIn [iMarker];
335 delete [] MassFlowOut [iMarker];
336 delete [] FlowAngleIn [iMarker];
337 delete [] FlowAngleOut [iMarker];
338 delete [] EulerianWork [iMarker];
339 delete [] TotalEnthalpyIn [iMarker];
340 delete [] TotalEnthalpyOut [iMarker];
341 delete [] TotalEnthalpyOutIs [iMarker];
342 delete [] PressureRatio [iMarker];
343 delete [] EnthalpyOut [iMarker];
344 delete [] VelocityOutIs [iMarker];
345 delete [] TotalTemperatureIn [iMarker];
346 delete [] FlowAngleIn_BC [iMarker];
347 delete [] EntropyIn [iMarker];
348 delete [] EntropyIn_BC [iMarker];
349 delete [] EntropyOut [iMarker];
350 delete [] TotalEnthalpyIn_BC [iMarker];
351 delete [] DensityIn [iMarker];
352 delete [] PressureIn [iMarker];
353 delete [] DensityOut [iMarker];
354 delete [] PressureOut [iMarker];
355 delete [] EnthalpyOutIs [iMarker];
356 delete [] EntropyGen [iMarker];
357 delete [] AbsFlowAngleIn [iMarker];
358 delete [] RothalpyIn [iMarker];
359 delete [] RothalpyOut [iMarker];
360 delete [] AbsFlowAngleOut [iMarker];
361 delete [] PressureOut_BC [iMarker];
362 delete [] MachIn [iMarker];
363 delete [] MachOut [iMarker];
364 delete [] TurboVelocityIn [iMarker];
365 delete [] TurboVelocityOut [iMarker];
366 delete [] TemperatureIn [iMarker];
367 delete [] TemperatureOut [iMarker];
368 delete [] TotalPressureIn [iMarker];
369 delete [] TotalPressureOut [iMarker];
370 delete [] TotalTemperatureOut [iMarker];
371 delete [] EnthalpyIn [iMarker];
372 delete [] TurbIntensityIn [iMarker];
373 delete [] Turb2LamViscRatioIn [iMarker];
374 delete [] TurbIntensityOut [iMarker];
375 delete [] Turb2LamViscRatioOut [iMarker];
376 delete [] NuFactorIn [iMarker];
377 delete [] NuFactorOut [iMarker];
381 delete [] TotalStaticEfficiency;
382 delete [] TotalTotalEfficiency;
383 delete [] KineticEnergyLoss;
385 delete [] TotalPressureLoss;
386 delete [] MassFlowIn;
387 delete [] MassFlowOut;
388 delete [] FlowAngleIn;
389 delete [] FlowAngleOut;
390 delete [] EulerianWork;
391 delete [] TotalEnthalpyIn;
392 delete [] TotalEnthalpyOut;
393 delete [] TotalEnthalpyOutIs;
394 delete [] PressureRatio;
395 delete [] EnthalpyOut;
396 delete [] VelocityOutIs;
397 delete [] TotalTemperatureIn;
398 delete [] FlowAngleIn_BC;
400 delete [] EntropyIn_BC;
401 delete [] EntropyOut;
402 delete [] TotalEnthalpyIn_BC;
404 delete [] PressureIn;
405 delete [] DensityOut;
406 delete [] PressureOut;
407 delete [] EnthalpyOutIs;
408 delete [] EntropyGen;
409 delete [] AbsFlowAngleIn;
410 delete [] RothalpyIn;
411 delete [] RothalpyOut;
412 delete [] AbsFlowAngleOut;
413 delete [] PressureOut_BC;
416 delete [] TurboVelocityIn;
417 delete [] TurboVelocityOut;
418 delete [] TemperatureIn;
419 delete [] TemperatureOut;
420 delete [] TotalPressureIn;
421 delete [] TotalPressureOut;
422 delete [] TotalTemperatureOut;
423 delete [] EnthalpyIn;
424 delete [] TurbIntensityIn;
425 delete [] Turb2LamViscRatioIn;
426 delete [] TurbIntensityOut;
427 delete [] Turb2LamViscRatioOut;
428 delete [] NuFactorIn;
429 delete [] NuFactorOut;
434 CSolver *FlowSolver,
unsigned long iExtIter,
435 unsigned short val_iZone,
unsigned short val_iInst) {
437 unsigned short iMarker;
438 unsigned long iPoint, iVertex, Global_Index;
439 su2double PressCoeff = 0.0, SkinFrictionCoeff[3], HeatFlux;
440 su2double xCoord = 0.0, yCoord = 0.0, zCoord = 0.0, Mach, Pressure;
444 unsigned short nDim = geometry->
GetnDim();
450 ofstream SurfFlow_file;
468 strcat (cstr, buffer);
469 SurfFlow_file.precision(15);
470 SurfFlow_file.open(cstr, ios::out);
472 SurfFlow_file <<
"\"Global_Index\", \"x_coord\", \"y_coord\", ";
473 if (nDim == 3) SurfFlow_file <<
"\"z_coord\", ";
474 SurfFlow_file <<
"\"Pressure\", \"Pressure_Coefficient\", ";
477 case EULER :
case INC_EULER: SurfFlow_file <<
"\"Mach_Number\"" <<
"\n";
break;
479 if (nDim == 2) SurfFlow_file <<
"\"Skin_Friction_Coefficient_X\", \"Skin_Friction_Coefficient_Y\", \"Heat_Flux\"" <<
"\n";
480 if (nDim == 3) SurfFlow_file <<
"\"Skin_Friction_Coefficient_X\", \"Skin_Friction_Coefficient_Y\", \"Skin_Friction_Coefficient_Z\", \"Heat_Flux\"" <<
"\n";
484 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
486 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
491 if (nDim == 3) zCoord = geometry->
node[iPoint]->
GetCoord(2);
496 xCoord *= 12.0; yCoord *= 12.0;
497 if (nDim == 3) zCoord *= 12.0;
501 PressCoeff = FlowSolver->
GetCPressure(iMarker, iVertex);
502 SurfFlow_file << scientific << Global_Index <<
", " << xCoord <<
", " << yCoord <<
", ";
503 if (nDim == 3) SurfFlow_file << scientific << zCoord <<
", ";
504 SurfFlow_file << scientific << Pressure <<
", " << PressCoeff <<
", ";
508 SurfFlow_file << scientific << Mach <<
"\n";
512 for (iDim = 0; iDim < nDim; iDim++)
513 SkinFrictionCoeff[iDim] = FlowSolver->
GetCSkinFriction(iMarker, iVertex, iDim);
514 HeatFlux = FlowSolver->
GetHeatFlux(iMarker, iVertex);
516 if (nDim == 2) SurfFlow_file << scientific << SkinFrictionCoeff[0] <<
", " << SkinFrictionCoeff[1] <<
", " << HeatFlux <<
"\n";
517 if (nDim == 3) SurfFlow_file << scientific << SkinFrictionCoeff[0] <<
", " << SkinFrictionCoeff[1] <<
", " << SkinFrictionCoeff[2] <<
", " << HeatFlux <<
"\n";
525 SurfFlow_file.close();
529 int iProcessor, nProcessor =
size;
531 unsigned long Buffer_Send_nVertex[1], *Buffer_Recv_nVertex = NULL;
532 unsigned long nVertex_Surface = 0, nLocalVertex_Surface = 0;
533 unsigned long MaxLocalVertex_Surface = 0;
539 nLocalVertex_Surface = 0;
542 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
544 if (geometry->
node[iPoint]->
GetDomain()) nLocalVertex_Surface++;
550 Buffer_Send_nVertex[0] = nLocalVertex_Surface;
551 if (
rank ==
MASTER_NODE) Buffer_Recv_nVertex =
new unsigned long [nProcessor];
577 su2double *Buffer_Recv_SkinFriction_x = NULL;
580 su2double *Buffer_Recv_SkinFriction_y = NULL;
583 su2double *Buffer_Recv_SkinFriction_z = NULL;
586 su2double *Buffer_Recv_HeatTransfer = NULL;
588 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long [MaxLocalVertex_Surface];
589 unsigned long *Buffer_Recv_GlobalIndex = NULL;
594 Buffer_Recv_Coord_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
595 Buffer_Recv_Coord_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
596 if (nDim == 3) Buffer_Recv_Coord_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
597 Buffer_Recv_Press =
new su2double [nProcessor*MaxLocalVertex_Surface];
598 Buffer_Recv_CPress =
new su2double [nProcessor*MaxLocalVertex_Surface];
599 Buffer_Recv_Mach =
new su2double [nProcessor*MaxLocalVertex_Surface];
600 Buffer_Recv_SkinFriction_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
601 Buffer_Recv_SkinFriction_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
602 if (nDim == 3) Buffer_Recv_SkinFriction_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
603 Buffer_Recv_HeatTransfer =
new su2double [nProcessor*MaxLocalVertex_Surface];
604 Buffer_Recv_GlobalIndex =
new unsigned long [nProcessor*MaxLocalVertex_Surface];
614 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
618 Buffer_Send_CPress[nVertex_Surface] = FlowSolver->
GetCPressure(iMarker, iVertex);
619 Buffer_Send_Coord_x[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(0);
620 Buffer_Send_Coord_y[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(1);
621 if (nDim == 3) { Buffer_Send_Coord_z[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(2); }
626 Buffer_Send_Coord_x[nVertex_Surface] *= 12.0;
627 Buffer_Send_Coord_y[nVertex_Surface] *= 12.0;
628 if (nDim == 3) Buffer_Send_Coord_z[nVertex_Surface] *= 12.0;
638 Buffer_Send_SkinFriction_x[nVertex_Surface] = FlowSolver->
GetCSkinFriction(iMarker, iVertex, 0);
639 Buffer_Send_SkinFriction_y[nVertex_Surface] = FlowSolver->
GetCSkinFriction(iMarker, iVertex, 1);
640 if (nDim == 3) Buffer_Send_SkinFriction_z[nVertex_Surface] = FlowSolver->
GetCSkinFriction(iMarker, iVertex, 2);
641 Buffer_Send_HeatTransfer[nVertex_Surface] = FlowSolver->
GetHeatFlux(iMarker, iVertex);
670 ofstream SurfFlow_file;
673 strcpy (cstr, filename.c_str());
687 strcat (cstr, buffer);
688 SurfFlow_file.precision(15);
689 SurfFlow_file.open(cstr, ios::out);
691 SurfFlow_file <<
"\"Global_Index\", \"x_coord\", \"y_coord\", ";
692 if (nDim == 3) SurfFlow_file <<
"\"z_coord\", ";
693 SurfFlow_file <<
"\"Pressure\", \"Pressure_Coefficient\", ";
698 if (nDim == 2) SurfFlow_file <<
"\"Skin_Friction_Coefficient_X\", \"Skin_Friction_Coefficient_Y\", \"Heat_Flux\"" <<
"\n";
699 if (nDim == 3) SurfFlow_file <<
"\"Skin_Friction_Coefficient_X\", \"Skin_Friction_Coefficient_Y\", \"Skin_Friction_Coefficient_Z\", \"Heat_Flux\"" <<
"\n";
705 unsigned long Total_Index;
706 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
707 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
710 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
711 Global_Index = Buffer_Recv_GlobalIndex[Total_Index];
714 xCoord = Buffer_Recv_Coord_x[Total_Index];
715 yCoord = Buffer_Recv_Coord_y[Total_Index];
716 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
717 Pressure = Buffer_Recv_Press[Total_Index];
718 PressCoeff = Buffer_Recv_CPress[Total_Index];
721 SurfFlow_file << scientific << Global_Index <<
", " << xCoord <<
", " << yCoord <<
", ";
722 if (nDim == 3) SurfFlow_file << scientific << zCoord <<
", ";
723 SurfFlow_file << scientific << Pressure <<
", " << PressCoeff <<
", ";
730 Mach = Buffer_Recv_Mach[Total_Index];
731 SurfFlow_file << scientific << Mach <<
"\n";
736 SkinFrictionCoeff[0] = Buffer_Recv_SkinFriction_x[Total_Index];
737 SkinFrictionCoeff[1] = Buffer_Recv_SkinFriction_y[Total_Index];
738 if (nDim == 3) SkinFrictionCoeff[2] = Buffer_Recv_SkinFriction_z[Total_Index];
739 HeatFlux = Buffer_Recv_HeatTransfer[Total_Index];
740 if (nDim == 2) SurfFlow_file << scientific << SkinFrictionCoeff[0] <<
", " << SkinFrictionCoeff[1] <<
", " << HeatFlux <<
"\n";
741 if (nDim == 3) SurfFlow_file << scientific << SkinFrictionCoeff[0] <<
", " << SkinFrictionCoeff[1] <<
", " << SkinFrictionCoeff[2] <<
", " << HeatFlux <<
"\n";
748 SurfFlow_file.close();
752 delete [] Buffer_Recv_Coord_x;
753 delete [] Buffer_Recv_Coord_y;
754 if (nDim == 3)
delete [] Buffer_Recv_Coord_z;
755 delete [] Buffer_Recv_Press;
756 delete [] Buffer_Recv_CPress;
757 delete [] Buffer_Recv_Mach;
758 delete [] Buffer_Recv_SkinFriction_x;
759 delete [] Buffer_Recv_SkinFriction_y;
760 if (nDim == 3)
delete [] Buffer_Recv_SkinFriction_z;
761 delete [] Buffer_Recv_HeatTransfer;
762 delete [] Buffer_Recv_GlobalIndex;
764 delete [] Buffer_Recv_nVertex;
770 delete [] Buffer_Send_Coord_x;
771 delete [] Buffer_Send_Coord_y;
772 delete [] Buffer_Send_Coord_z;
773 delete [] Buffer_Send_Press;
774 delete [] Buffer_Send_CPress;
775 delete [] Buffer_Send_Mach;
776 delete [] Buffer_Send_SkinFriction_x;
777 delete [] Buffer_Send_SkinFriction_y;
778 delete [] Buffer_Send_SkinFriction_z;
779 delete [] Buffer_Send_HeatTransfer;
780 delete [] Buffer_Send_GlobalIndex;
790 unsigned long iPoint, iVertex, Global_Index;
791 su2double *Solution, xCoord, yCoord, zCoord;
792 unsigned short iMarker;
793 char cstr[200], buffer[50];
794 ofstream SurfAdj_file;
813 strcat(cstr, buffer);
814 SurfAdj_file.precision(15);
815 SurfAdj_file.open(cstr, ios::out);
819 if (geometry->
GetnDim() == 2) {
821 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"PsiE\",\"x_coord\",\"y_coord\"";
823 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"x_coord\",\"y_coord\"";
826 SurfAdj_file <<
",\"x_Sens\",\"y_Sens\"";
828 SurfAdj_file <<
"\n";
830 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
832 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
846 SurfAdj_file << scientific << Global_Index <<
", " << AdjSolver->
GetCSensitivity(iMarker, iVertex) <<
", " << Solution[0] <<
", " 847 << Solution[1] <<
", " << Solution[2] <<
", " << Solution[3] <<
", " << xCoord <<
", "<< yCoord;
849 SurfAdj_file << scientific << Global_Index <<
", " << AdjSolver->
GetCSensitivity(iMarker, iVertex) <<
", " << Solution[0] <<
", " 850 << Solution[1] <<
", " << Solution[2] <<
", " << xCoord <<
", "<< yCoord;
854 SurfAdj_file <<
"\n";
859 if (geometry->
GetnDim() == 3) {
861 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"Phi_z\",\"PsiE\",\"x_coord\",\"y_coord\",\"z_coord\"";
863 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"Phi_z\",\"x_coord\",\"y_coord\",\"z_coord\"";
866 SurfAdj_file <<
",\"x_Sens\",\"y_Sens\",\"z_Sens\"";
868 SurfAdj_file <<
"\n";
869 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
871 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
888 SurfAdj_file << scientific << Global_Index <<
", " << AdjSolver->
GetCSensitivity(iMarker, iVertex) <<
", " << Solution[0] <<
", " 889 << Solution[1] <<
", " << Solution[2] <<
", " << Solution[3] <<
", " << Solution[4] <<
", "<< xCoord <<
", "<< yCoord <<
", "<< zCoord;
891 SurfAdj_file << scientific << Global_Index <<
", " << AdjSolver->
GetCSensitivity(iMarker, iVertex) <<
", " << Solution[0] <<
", " 892 << Solution[1] <<
", " << Solution[2] <<
", " << Solution[3] <<
", " << xCoord <<
", "<< yCoord <<
", "<< zCoord;
897 SurfAdj_file <<
"\n";
902 SurfAdj_file.close();
905 int iProcessor, nProcessor =
size;
907 unsigned short nDim = geometry->
GetnDim(), iMarker;
909 unsigned long Buffer_Send_nVertex[1], iVertex, iPoint, nVertex_Surface = 0, nLocalVertex_Surface = 0,
910 MaxLocalVertex_Surface = 0, nBuffer_Scalar;
911 unsigned long *Buffer_Receive_nVertex = NULL;
912 ofstream SurfAdj_file;
915 nLocalVertex_Surface = 0;
918 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
920 if (geometry->
node[iPoint]->
GetDomain()) nLocalVertex_Surface ++;
924 Buffer_Receive_nVertex =
new unsigned long [nProcessor];
926 Buffer_Send_nVertex[0] = nLocalVertex_Surface;
934 unsigned long *Buffer_Send_GlobalPoint=
new unsigned long[MaxLocalVertex_Surface];
943 Buffer_Send_PsiE =
new su2double[MaxLocalVertex_Surface];
945 su2double *Buffer_Send_Sens_x = NULL, *Buffer_Send_Sens_y = NULL, *Buffer_Send_Sens_z = NULL;
948 Buffer_Send_Sens_x =
new su2double[MaxLocalVertex_Surface];
949 Buffer_Send_Sens_y =
new su2double[MaxLocalVertex_Surface];
951 Buffer_Send_Sens_z =
new su2double[MaxLocalVertex_Surface];
958 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
966 Buffer_Send_Coord_x[nVertex_Surface] = Coord[0];
967 Buffer_Send_Coord_y[nVertex_Surface] = Coord[1];
968 Buffer_Send_Sensitivity[nVertex_Surface] = AdjSolver->
GetCSensitivity(iMarker, iVertex);
969 Buffer_Send_PsiRho[nVertex_Surface] = Solution[0];
970 Buffer_Send_Phi_x[nVertex_Surface] = Solution[1];
971 Buffer_Send_Phi_y[nVertex_Surface] = Solution[2];
974 Buffer_Send_Coord_z[nVertex_Surface] = Coord[2];
975 Buffer_Send_Phi_z[nVertex_Surface] = Solution[3];
989 Buffer_Send_Coord_x[nVertex_Surface] *= 12.0;
990 Buffer_Send_Coord_y[nVertex_Surface] *= 12.0;
991 if (nDim == 3) Buffer_Send_Coord_z[nVertex_Surface] *= 12.0;
998 su2double *Buffer_Receive_Coord_x = NULL, *Buffer_Receive_Coord_y = NULL, *Buffer_Receive_Coord_z = NULL, *Buffer_Receive_Sensitivity = NULL,
999 *Buffer_Receive_PsiRho = NULL, *Buffer_Receive_Phi_x = NULL, *Buffer_Receive_Phi_y = NULL, *Buffer_Receive_Phi_z = NULL,
1000 *Buffer_Receive_PsiE = NULL, *Buffer_Receive_Sens_x = NULL, *Buffer_Receive_Sens_y = NULL, *Buffer_Receive_Sens_z = NULL;
1001 unsigned long *Buffer_Receive_GlobalPoint = NULL;
1004 Buffer_Receive_Coord_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
1005 Buffer_Receive_Coord_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
1006 if (nDim == 3) Buffer_Receive_Coord_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
1007 Buffer_Receive_GlobalPoint =
new unsigned long [nProcessor*MaxLocalVertex_Surface];
1008 Buffer_Receive_Sensitivity =
new su2double [nProcessor*MaxLocalVertex_Surface];
1009 Buffer_Receive_PsiRho =
new su2double [nProcessor*MaxLocalVertex_Surface];
1010 Buffer_Receive_Phi_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
1011 Buffer_Receive_Phi_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
1012 if (nDim == 3) Buffer_Receive_Phi_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
1014 Buffer_Receive_PsiE =
new su2double [nProcessor*MaxLocalVertex_Surface];
1016 Buffer_Receive_Sens_x =
new su2double[nProcessor*MaxLocalVertex_Surface];
1017 Buffer_Receive_Sens_y =
new su2double[nProcessor*MaxLocalVertex_Surface];
1019 Buffer_Receive_Sens_z =
new su2double[nProcessor*MaxLocalVertex_Surface];
1024 nBuffer_Scalar = MaxLocalVertex_Surface;
1048 unsigned long iVertex, GlobalPoint, position;
1049 char cstr[200], buffer[50];
1050 ofstream SurfAdj_file;
1054 strcpy (cstr, filename.c_str());
1069 strcat (cstr, buffer);
1070 SurfAdj_file.open(cstr, ios::out);
1071 SurfAdj_file.precision(15);
1076 if (geometry->
GetnDim() == 2) {
1078 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"PsiE\",\"x_coord\",\"y_coord\"";
1080 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"x_coord\",\"y_coord\"";
1083 SurfAdj_file <<
",\" x_Sens\",\"y_Sens\"";
1085 SurfAdj_file <<
"\n";
1087 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++)
1088 for (iVertex = 0; iVertex < Buffer_Receive_nVertex[iProcessor]; iVertex++) {
1090 position = iProcessor*MaxLocalVertex_Surface+iVertex;
1091 GlobalPoint = Buffer_Receive_GlobalPoint[position];
1094 SurfAdj_file << scientific << GlobalPoint <<
1095 ", " << Buffer_Receive_Sensitivity[position] <<
", " << Buffer_Receive_PsiRho[position] <<
1096 ", " << Buffer_Receive_Phi_x[position] <<
", " << Buffer_Receive_Phi_y[position] <<
1097 ", " << Buffer_Receive_PsiE[position] <<
", " << Buffer_Receive_Coord_x[position] <<
1098 ", "<< Buffer_Receive_Coord_y[position];
1100 SurfAdj_file << scientific << GlobalPoint <<
1101 ", " << Buffer_Receive_Sensitivity[position] <<
", " << Buffer_Receive_PsiRho[position] <<
1102 ", " << Buffer_Receive_Phi_x[position] <<
", " << Buffer_Receive_Phi_y[position] <<
1103 ", " << Buffer_Receive_Coord_x[position] <<
1104 ", "<< Buffer_Receive_Coord_y[position];
1106 SurfAdj_file <<
", " << Buffer_Receive_Sens_x[position] <<
", " << Buffer_Receive_Sens_y[position];
1108 SurfAdj_file <<
"\n";
1113 if (geometry->
GetnDim() == 3) {
1115 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"Phi_z\",\"PsiE\",\"x_coord\",\"y_coord\",\"z_coord\"";
1117 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"Phi_z\",\"x_coord\",\"y_coord\",\"z_coord\"";
1120 SurfAdj_file <<
",\"x_Sens\",\"y_Sens\",\"z_Sens\"";
1122 SurfAdj_file <<
"\n";
1124 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++)
1125 for (iVertex = 0; iVertex < Buffer_Receive_nVertex[iProcessor]; iVertex++) {
1126 position = iProcessor*MaxLocalVertex_Surface+iVertex;
1127 GlobalPoint = Buffer_Receive_GlobalPoint[position];
1130 SurfAdj_file << scientific << GlobalPoint <<
1131 ", " << Buffer_Receive_Sensitivity[position] <<
", " << Buffer_Receive_PsiRho[position] <<
1132 ", " << Buffer_Receive_Phi_x[position] <<
", " << Buffer_Receive_Phi_y[position] <<
", " << Buffer_Receive_Phi_z[position] <<
1133 ", " << Buffer_Receive_PsiE[position] <<
", "<< Buffer_Receive_Coord_x[position] <<
1134 ", "<< Buffer_Receive_Coord_y[position] <<
", "<< Buffer_Receive_Coord_z[position];
1136 SurfAdj_file << scientific << GlobalPoint <<
1137 ", " << Buffer_Receive_Sensitivity[position] <<
", " << Buffer_Receive_PsiRho[position] <<
1138 ", " << Buffer_Receive_Phi_x[position] <<
", " << Buffer_Receive_Phi_y[position] <<
", " << Buffer_Receive_Phi_z[position] <<
1139 ", "<< Buffer_Receive_Coord_x[position] <<
1140 ", "<< Buffer_Receive_Coord_y[position] <<
", "<< Buffer_Receive_Coord_z[position];
1143 SurfAdj_file <<
", " << Buffer_Receive_Sens_x[position] <<
", " << Buffer_Receive_Sens_y[position] <<
", " << Buffer_Receive_Sens_z[position];
1145 SurfAdj_file <<
"\n";
1152 delete [] Buffer_Receive_nVertex;
1153 delete [] Buffer_Receive_Coord_x;
1154 delete [] Buffer_Receive_Coord_y;
1155 if (nDim == 3)
delete [] Buffer_Receive_Coord_z;
1156 delete [] Buffer_Receive_Sensitivity;
1157 delete [] Buffer_Receive_PsiRho;
1158 delete [] Buffer_Receive_Phi_x;
1159 delete [] Buffer_Receive_Phi_y;
1160 if (nDim == 3)
delete [] Buffer_Receive_Phi_z;
1162 delete [] Buffer_Receive_PsiE;
1163 delete [] Buffer_Receive_GlobalPoint;
1165 delete [] Buffer_Receive_Sens_x;
1166 delete [] Buffer_Receive_Sens_y;
1168 delete [] Buffer_Receive_Sens_z;
1173 delete [] Buffer_Send_Coord_x;
1174 delete [] Buffer_Send_Coord_y;
1175 delete [] Buffer_Send_Coord_z;
1176 delete [] Buffer_Send_GlobalPoint;
1177 delete [] Buffer_Send_Sensitivity;
1178 delete [] Buffer_Send_PsiRho;
1179 delete [] Buffer_Send_Phi_x;
1180 delete [] Buffer_Send_Phi_y;
1181 delete [] Buffer_Send_Phi_z;
1182 delete [] Buffer_Send_PsiE;
1183 if (Buffer_Send_Sens_x != NULL)
delete [] Buffer_Send_Sens_x;
1184 if (Buffer_Send_Sens_y != NULL)
delete [] Buffer_Send_Sens_y;
1185 if (Buffer_Send_Sens_z != NULL)
delete [] Buffer_Send_Sens_z;
1187 SurfAdj_file.close();
1208 cout <<
"Merging volumetric triangle grid connectivity." << endl;
1212 cout <<
"Merging volumetric quadrilateral grid connectivity." << endl;
1216 cout <<
"Merging volumetric tetrahedron grid connectivity." << endl;
1220 cout <<
"Merging volumetric hexahedron grid connectivity." << endl;
1224 cout <<
"Merging volumetric prism grid connectivity." << endl;
1228 cout <<
"Merging volumetric pyramid grid connectivity." << endl;
1238 cout <<
"Merging surface line grid connectivity." << endl;
1242 cout <<
"Merging surface triangle grid connectivity." << endl;
1246 cout <<
"Merging surface quadrilateral grid connectivity." << endl;
1253 nGlobal_Elem = nGlobal_Tria + nGlobal_Quad + nGlobal_Tetr +
1254 nGlobal_Hexa + nGlobal_Pyra + nGlobal_Pris;
1258 nSurf_Elem = nGlobal_Line + nGlobal_BoundTria + nGlobal_BoundQuad;
1266 unsigned short iDim, nDim = geometry->
GetnDim();
1267 unsigned long iPoint;
1276 unsigned short iMarker;
1277 unsigned long iVertex, nTotalPoints = 0;
1283 int *Local_Halo =
new int[geometry->
GetnPoint()];
1284 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
1287 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
1290 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
1304 if (isPeriodic && (SendRecv < 0)) {
1305 Local_Halo[iPoint] =
false;
1313 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
1314 if (!Local_Halo[iPoint]) nTotalPoints++;
1316 nGlobal_Poin = nTotalPoints;
1322 for (iDim = 0; iDim < nDim; iDim++) {
1323 Coords[iDim] =
new su2double[nGlobal_Poin];
1328 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
1333 if (!Local_Halo[iPoint]) {
1339 for (iDim = 0; iDim < nDim; iDim++) {
1340 Coords[iDim][iGlobal_Index] = geometry->
node[iPoint]->
GetCoord(iDim);
1345 Coords[iDim][iGlobal_Index] *= 12.0;
1354 delete [] Local_Halo;
1359 int iProcessor, nProcessor =
size;
1360 unsigned long jPoint;
1362 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
1366 unsigned long iVertex, iMarker;
1367 unsigned long Buffer_Send_nPoin[1], *Buffer_Recv_nPoin = NULL;
1368 unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
1369 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
1371 if (
rank ==
MASTER_NODE) Buffer_Recv_nPoin =
new unsigned long[nProcessor];
1373 int *Local_Halo =
new int[geometry->
GetnPoint()];
1374 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
1384 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
1390 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
1404 Local_Halo[iPoint] =
false;
1412 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
1413 if (Local_Halo[iPoint] ==
false)
1416 Buffer_Send_nPoin[0] = nLocalPoint;
1426 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
1427 nGlobal_Doma += Buffer_Recv_nPoin[iProcessor];
1430 nBuffer_Scalar = MaxLocalPoint;
1440 su2double *Buffer_Send_Z = NULL, *Buffer_Recv_Z = NULL;
1441 if (nDim == 3) Buffer_Send_Z =
new su2double[MaxLocalPoint];
1443 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
1444 unsigned long *Buffer_Recv_GlobalIndex = NULL;
1450 Buffer_Recv_X =
new su2double[nProcessor*MaxLocalPoint];
1451 Buffer_Recv_Y =
new su2double[nProcessor*MaxLocalPoint];
1452 if (nDim == 3) Buffer_Recv_Z =
new su2double[nProcessor*MaxLocalPoint];
1453 Buffer_Recv_GlobalIndex =
new unsigned long[nProcessor*MaxLocalPoint];
1457 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
1458 nGlobal_Poin += Buffer_Recv_nPoin[iProcessor];
1461 for (iDim = 0; iDim < nDim; iDim++) {
1462 Coords[iDim] =
new su2double[nGlobal_Poin];
1473 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
1476 if (!Local_Halo[iPoint] || Wrt_Halo) {
1482 Buffer_Send_X[jPoint] = Coords_Local[0];
1483 Buffer_Send_Y[jPoint] = Coords_Local[1];
1484 if (nDim == 3) Buffer_Send_Z[jPoint] = Coords_Local[2];
1489 Buffer_Send_X[jPoint] *= 12.0;
1490 Buffer_Send_Y[jPoint] *= 12.0;
1491 if (nDim == 3) Buffer_Send_Z[jPoint] *= 12.0;
1516 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
1517 for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
1519 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
1520 if (iGlobal_Index >= nGlobal_Poin) {
1521 cout << iGlobal_Index <<
" " << nGlobal_Poin << endl;
1523 Coords[0][iGlobal_Index] = Buffer_Recv_X[jPoint];
1524 Coords[1][iGlobal_Index] = Buffer_Recv_Y[jPoint];
1525 if (nDim == 3) Coords[2][iGlobal_Index] = Buffer_Recv_Z[jPoint];
1529 jPoint = (iProcessor+1)*nBuffer_Scalar;
1535 delete [] Local_Halo;
1536 delete [] Buffer_Send_X;
1537 delete [] Buffer_Send_Y;
1538 if (Buffer_Send_Z != NULL)
delete [] Buffer_Send_Z;
1539 delete [] Buffer_Send_GlobalIndex;
1541 delete [] Buffer_Recv_X;
1542 delete [] Buffer_Recv_Y;
1543 if (Buffer_Recv_Z != NULL)
delete [] Buffer_Recv_Z;
1544 delete [] Buffer_Recv_GlobalIndex;
1545 delete [] Buffer_Recv_nPoin;
1555 unsigned short NODES_PER_ELEMENT = 0;
1556 unsigned long iPoint, iNode, jNode;
1557 unsigned long iElem = 0;
1558 unsigned long nLocalElem = 0, nElem_Total = 0;
1560 unsigned long iVertex, iMarker;
1561 unsigned long jElem;
1562 int SendRecv, RecvFrom;
1564 unsigned long Buffer_Send_nElem[1], *Buffer_Recv_nElem = NULL;
1565 unsigned long nBuffer_Scalar = 0;
1566 unsigned long kNode = 0, kElem = 0;
1567 unsigned long MaxLocalElem = 0, iGlobal_Index, jPoint, kPoint;
1570 bool *Write_Elem = NULL, notPeriodic, notHalo, addedPeriodic, isPeriodic;
1574 int *Conn_Elem = NULL;
1581 switch (Elem_Type) {
1613 Buffer_Send_nElem[0] = nLocalElem;
1620 MaxLocalElem = nLocalElem;
1621 Buffer_Recv_nElem[0] = Buffer_Send_nElem[0];
1624 nBuffer_Scalar = MaxLocalElem*NODES_PER_ELEMENT;
1628 unsigned long *Buffer_Send_Elem =
new unsigned long[nBuffer_Scalar];
1629 unsigned long *Buffer_Recv_Elem = NULL;
1631 unsigned short *Buffer_Send_Halo =
new unsigned short[MaxLocalElem];
1632 unsigned short *Buffer_Recv_Halo = NULL;
1637 Buffer_Recv_Elem =
new unsigned long[
size*nBuffer_Scalar];
1638 Buffer_Recv_Halo =
new unsigned short[
size*MaxLocalElem];
1639 if (MaxLocalElem > 0) Conn_Elem =
new int[
size*MaxLocalElem*NODES_PER_ELEMENT];
1647 vector<unsigned long> Added_Periodic;
1648 Added_Periodic.clear();
1651 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
1654 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
1673 unsigned long nAddedPeriodic = 0, maxAddedPeriodic = 0;
1674 unsigned long Buffer_Send_nAddedPeriodic[1], *Buffer_Recv_nAddedPeriodic = NULL;
1675 Buffer_Recv_nAddedPeriodic =
new unsigned long[
size];
1677 nAddedPeriodic = Added_Periodic.size();
1678 Buffer_Send_nAddedPeriodic[0] = nAddedPeriodic;
1686 maxAddedPeriodic = nAddedPeriodic;
1687 Buffer_Recv_nAddedPeriodic[0] = Buffer_Send_nAddedPeriodic[0];
1691 unsigned long *Buffer_Send_AddedPeriodic =
new unsigned long[maxAddedPeriodic];
1692 unsigned long *Buffer_Recv_AddedPeriodic =
new unsigned long[
size*maxAddedPeriodic];
1694 for (iPoint = 0; iPoint < Added_Periodic.size(); iPoint++) {
1695 Buffer_Send_AddedPeriodic[iPoint] = Added_Periodic[iPoint];
1706 for (iPoint = 0; iPoint < maxAddedPeriodic; iPoint++) Buffer_Recv_AddedPeriodic[iPoint] = Buffer_Send_AddedPeriodic[iPoint];
1716 int *Local_Halo =
new int[geometry->
GetnPoint()];
1717 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
1720 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
1723 RecvFrom = abs(SendRecv)-1;
1725 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
1731 (SendRecv < 0) && (
rank > RecvFrom));
1743 notPeriodic = (isPeriodic && (SendRecv < 0));
1747 addedPeriodic =
false; kPoint = 0;
1748 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
1749 for (jPoint = 0; jPoint < Buffer_Recv_nAddedPeriodic[iProcessor]; jPoint++) {
1750 if (iGlobal_Index == Buffer_Recv_AddedPeriodic[kPoint+jPoint])
1751 addedPeriodic =
true;
1754 kPoint = (iProcessor+1)*maxAddedPeriodic;
1758 if ((notHalo || notPeriodic) && !addedPeriodic) {
1759 Local_Halo[iPoint] =
false;
1769 jNode = 0; jElem = 0;
1770 for (iElem = 0; iElem < geometry->
GetnElem(); iElem++) {
1776 Buffer_Send_Halo[jElem] =
false;
1777 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
1788 if (Local_Halo[iPoint]) {
1789 Buffer_Send_Halo[jElem] =
true;
1807 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Elem[iPoint] = Buffer_Send_Elem[iPoint];
1808 for (iPoint = 0; iPoint < MaxLocalElem; iPoint++) Buffer_Recv_Halo[iPoint] = Buffer_Send_Halo[iPoint];
1819 Write_Elem =
new bool[
size*MaxLocalElem];
1820 for (iElem = 0; iElem <
size*MaxLocalElem; iElem++) {
1821 Write_Elem[iElem] =
true;
1832 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
1833 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
1836 if (Buffer_Recv_Halo[kElem+iElem])
1837 Write_Elem[kElem+iElem] =
false;
1840 kElem = (iProcessor+1)*MaxLocalElem;
1846 jNode = 0; kNode = 0; jElem = 0; nElem_Total = 0;
1847 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
1848 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
1851 if (Write_Elem[jElem+iElem]) {
1860 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
1861 Conn_Elem[kNode] = (int)Buffer_Recv_Elem[jNode+iElem*NODES_PER_ELEMENT+iNode] + 1;
1867 jElem = (iProcessor+1)*MaxLocalElem;
1868 jNode = (iProcessor+1)*nBuffer_Scalar;
1873 delete [] Buffer_Send_Elem;
1874 delete [] Buffer_Send_Halo;
1875 delete [] Buffer_Recv_nAddedPeriodic;
1876 delete [] Buffer_Send_AddedPeriodic;
1877 delete [] Buffer_Recv_AddedPeriodic;
1878 delete [] Local_Halo;
1880 delete [] Buffer_Recv_nElem;
1881 delete [] Buffer_Recv_Elem;
1882 delete [] Buffer_Recv_Halo;
1883 delete [] Write_Elem;
1890 switch (Elem_Type) {
1892 nGlobal_Tria = nElem_Total;
1893 if (nGlobal_Tria > 0) Conn_Tria = Conn_Elem;
1896 nGlobal_Quad = nElem_Total;
1897 if (nGlobal_Quad > 0) Conn_Quad = Conn_Elem;
1900 nGlobal_Tetr = nElem_Total;
1901 if (nGlobal_Tetr > 0) Conn_Tetr = Conn_Elem;
1904 nGlobal_Hexa = nElem_Total;
1905 if (nGlobal_Hexa > 0) Conn_Hexa = Conn_Elem;
1908 nGlobal_Pris = nElem_Total;
1909 if (nGlobal_Pris > 0) Conn_Pris = Conn_Elem;
1912 nGlobal_Pyra = nElem_Total;
1913 if (nGlobal_Pyra > 0) Conn_Pyra = Conn_Elem;
1925 unsigned short NODES_PER_ELEMENT;
1927 unsigned short iMarker;
1928 unsigned long iPoint, iNode, jNode;
1929 unsigned long iElem = 0;
1930 unsigned long nLocalElem = 0, nElem_Total = 0;
1933 unsigned long jElem;
1935 unsigned long iVertex;
1937 int SendRecv, RecvFrom;
1939 unsigned long Buffer_Send_nElem[1], *Buffer_Recv_nElem = NULL;
1940 unsigned long nBuffer_Scalar = 0;
1941 unsigned long kNode = 0, kElem = 0;
1942 unsigned long MaxLocalElem = 0, iGlobal_Index, jPoint, kPoint;
1945 bool *Write_Elem = NULL, notPeriodic, notHalo, addedPeriodic;
1948 int *Conn_Elem = NULL;
1957 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
1959 for (iElem = 0; iElem < geometry->
GetnElem_Bound(iMarker); iElem++) {
1967 switch (Elem_Type) {
1979 NODES_PER_ELEMENT = 0;
1986 Buffer_Send_nElem[0] = nLocalElem;
1993 MaxLocalElem = nLocalElem;
1994 Buffer_Recv_nElem[0] = Buffer_Send_nElem[0];
1997 nBuffer_Scalar = MaxLocalElem*NODES_PER_ELEMENT;
2001 unsigned long *Buffer_Send_Elem =
new unsigned long[nBuffer_Scalar];
2002 unsigned long *Buffer_Recv_Elem = NULL;
2004 unsigned short *Buffer_Send_Halo =
new unsigned short[MaxLocalElem];
2005 unsigned short *Buffer_Recv_Halo = NULL;
2010 Buffer_Recv_Elem =
new unsigned long[
size*nBuffer_Scalar];
2011 Buffer_Recv_Halo =
new unsigned short[
size*MaxLocalElem];
2012 if (MaxLocalElem > 0) Conn_Elem =
new int[
size*MaxLocalElem*NODES_PER_ELEMENT];
2020 vector<unsigned long> Added_Periodic;
2021 Added_Periodic.clear();
2022 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
2025 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2042 unsigned long nAddedPeriodic = 0, maxAddedPeriodic = 0;
2043 unsigned long Buffer_Send_nAddedPeriodic[1], *Buffer_Recv_nAddedPeriodic = NULL;
2044 Buffer_Recv_nAddedPeriodic =
new unsigned long[
size];
2046 nAddedPeriodic = Added_Periodic.size();
2047 Buffer_Send_nAddedPeriodic[0] = nAddedPeriodic;
2055 maxAddedPeriodic = nAddedPeriodic;
2056 Buffer_Recv_nAddedPeriodic[0] = Buffer_Send_nAddedPeriodic[0];
2060 unsigned long *Buffer_Send_AddedPeriodic =
new unsigned long[maxAddedPeriodic];
2061 unsigned long *Buffer_Recv_AddedPeriodic =
new unsigned long[
size*maxAddedPeriodic];
2063 for (iPoint = 0; iPoint < Added_Periodic.size(); iPoint++) {
2064 Buffer_Send_AddedPeriodic[iPoint] = Added_Periodic[iPoint];
2075 for (iPoint = 0; iPoint < maxAddedPeriodic; iPoint++) Buffer_Recv_AddedPeriodic[iPoint] = Buffer_Send_AddedPeriodic[iPoint];
2085 int *Local_Halo =
new int[geometry->
GetnPoint()];
2086 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
2089 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
2092 RecvFrom = abs(SendRecv)-1;
2094 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2100 (SendRecv < 0) && (
rank > RecvFrom));
2109 addedPeriodic =
false; kPoint = 0;
2110 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2111 for (jPoint = 0; jPoint < Buffer_Recv_nAddedPeriodic[iProcessor]; jPoint++) {
2112 if (iGlobal_Index == Buffer_Recv_AddedPeriodic[kPoint+jPoint])
2113 addedPeriodic =
true;
2116 kPoint = (iProcessor+1)*maxAddedPeriodic;
2120 if ((notHalo || notPeriodic) && !addedPeriodic) {
2121 Local_Halo[iPoint] =
false;
2130 jNode = 0; jElem = 0;
2133 for (iElem = 0; iElem < geometry->
GetnElem_Bound(iMarker); iElem++) {
2140 Buffer_Send_Halo[jElem] =
false;
2141 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
2145 iPoint = geometry->
bound[iMarker][iElem]->
GetNode(iNode);
2152 if (Local_Halo[iPoint])
2153 Buffer_Send_Halo[jElem] =
true;
2170 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Elem[iPoint] = Buffer_Send_Elem[iPoint];
2171 for (iPoint = 0; iPoint < MaxLocalElem; iPoint++) Buffer_Recv_Halo[iPoint] = Buffer_Send_Halo[iPoint];
2182 Write_Elem =
new bool[
size*MaxLocalElem];
2183 for (iElem = 0; iElem <
size*MaxLocalElem; iElem++) {
2184 Write_Elem[iElem] =
true;
2195 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2196 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
2199 if (Buffer_Recv_Halo[kElem+iElem])
2200 Write_Elem[kElem+iElem] =
false;
2203 kElem = (iProcessor+1)*MaxLocalElem;
2209 jNode = 0; kNode = 0; jElem = 0; nElem_Total = 0;
2210 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2211 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
2214 if (Write_Elem[jElem+iElem]) {
2223 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
2224 Conn_Elem[kNode] = (int)Buffer_Recv_Elem[jNode+iElem*NODES_PER_ELEMENT+iNode] + 1;
2230 jElem = (iProcessor+1)*MaxLocalElem;
2231 jNode = (iProcessor+1)*nBuffer_Scalar;
2236 delete [] Buffer_Send_Elem;
2237 delete [] Buffer_Send_Halo;
2238 delete [] Buffer_Recv_nAddedPeriodic;
2239 delete [] Buffer_Send_AddedPeriodic;
2240 delete [] Buffer_Recv_AddedPeriodic;
2241 delete [] Local_Halo;
2243 delete [] Buffer_Recv_nElem;
2244 delete [] Buffer_Recv_Elem;
2245 delete [] Buffer_Recv_Halo;
2246 delete [] Write_Elem;
2253 switch (Elem_Type) {
2255 nGlobal_Line = nElem_Total;
2256 if (nGlobal_Line > 0) Conn_Line = Conn_Elem;
2259 nGlobal_BoundTria = nElem_Total;
2260 if (nGlobal_BoundTria > 0) Conn_BoundTria = Conn_Elem;
2263 nGlobal_BoundQuad = nElem_Total;
2264 if (nGlobal_BoundQuad > 0) Conn_BoundQuad = Conn_Elem;
2277 unsigned short iVar = 0, jVar = 0, FirstIndex =
NONE, SecondIndex =
NONE, ThirdIndex =
NONE;
2278 unsigned short nVar_First = 0, nVar_Second = 0, nVar_Third = 0;
2279 unsigned short iVar_GridVel = 0, iVar_PressCp = 0, iVar_Lam = 0, iVar_MachMean = 0,
2280 iVar_ViscCoeffs = 0, iVar_HeatCoeffs = 0, iVar_Sens = 0, iVar_Extra = 0, iVar_Eddy = 0, iVar_Sharp = 0,
2281 iVar_FEA_Vel = 0, iVar_FEA_Accel = 0, iVar_FEA_Stress = 0, iVar_FEA_Stress_3D = 0,
2282 iVar_FEA_Extra = 0, iVar_SensDim = 0;
2283 unsigned long iPoint = 0, jPoint = 0, iVertex = 0, iMarker = 0;
2284 su2double Gas_Constant, Mach2Vel, Mach_Motion, RefDensity, RefPressure = 0.0, factor = 0.0;
2286 su2double *Aux_Frict_x = NULL, *Aux_Frict_y = NULL, *Aux_Frict_z = NULL, *Aux_Heat = NULL, *Aux_yPlus = NULL, *Aux_Sens = NULL;
2288 unsigned short CurrentIndex;
2290 unsigned long Buffer_Send_nPoint[1], *Buffer_Recv_nPoint = NULL;
2291 unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
2292 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
2293 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
2316 unsigned short iDim;
2317 unsigned short nDim = geometry->
GetnDim();
2328 RefVel2 = (Mach_Motion*Mach2Vel)*(Mach_Motion*Mach2Vel);
2332 for (iDim = 0; iDim < nDim; iDim++)
2337 factor = 1.0 / (0.5*RefDensity*RefArea*RefVel2);
2344 switch (Kind_Solver) {
2355 default: SecondIndex =
NONE; ThirdIndex =
NONE;
break;
2358 nVar_First = solver[FirstIndex]->
GetnVar();
2359 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
2360 if (ThirdIndex !=
NONE) nVar_Third = solver[ThirdIndex]->
GetnVar();
2361 nVar_Consv = nVar_First + nVar_Second + nVar_Third;
2362 nVar_Total = nVar_Consv;
2375 if (dynamic_grid && !fem) {
2376 iVar_GridVel = nVar_Total;
2377 if (geometry->
GetnDim() == 2) nVar_Total += 2;
2378 else if (geometry->
GetnDim() == 3) nVar_Total += 3;
2387 iVar_PressCp = nVar_Total; nVar_Total += 3;
2388 iVar_MachMean = nVar_Total; nVar_Total += 1;
2396 iVar_Lam = nVar_Total;
2398 iVar_ViscCoeffs = nVar_Total;
2399 if (geometry->
GetnDim() == 2) nVar_Total += 2;
2400 else if (geometry->
GetnDim() == 3) nVar_Total += 3;
2401 iVar_HeatCoeffs = nVar_Total;
2408 iVar_Eddy = nVar_Total; nVar_Total += 1;
2417 iVar_Sharp = nVar_Total; nVar_Total += 1;
2425 iVar_Sens = nVar_Total; nVar_Total += 2;
2432 iVar_FEA_Vel = nVar_Total;
2433 if (geometry->
GetnDim() == 2) nVar_Total += 2;
2434 else if (geometry->
GetnDim() == 3) nVar_Total += 3;
2436 iVar_FEA_Accel = nVar_Total;
2437 if (geometry->
GetnDim() == 2) nVar_Total += 2;
2438 else if (geometry->
GetnDim() == 3) nVar_Total += 3;
2440 iVar_FEA_Stress = nVar_Total; nVar_Total += 3;
2441 if (geometry->
GetnDim() == 3) {iVar_FEA_Stress_3D = nVar_Total; nVar_Total += 3;}
2442 iVar_FEA_Extra = nVar_Total; nVar_Total += 1;
2451 iVar_Sens = nVar_Total; nVar_Total += 1;
2452 iVar_SensDim = nVar_Total; nVar_Total += nDim;
2456 iVar_FEA_Extra = nVar_Total; nVar_Total += 2;
2467 Local_Halo =
new int[geometry->
GetnPoint()];
2468 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
2478 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
2484 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2488 if (isPeriodic) Local_Halo[iPoint] =
false;
2495 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
2496 if (Local_Halo[iPoint] ==
false)
2500 Buffer_Send_nPoint[0] = nLocalPoint;
2510 MaxLocalPoint = nLocalPoint;
2511 Buffer_Recv_nPoint[0] = Buffer_Send_nPoint[0];
2514 nBuffer_Scalar = MaxLocalPoint;
2527 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
2528 unsigned long *Buffer_Recv_GlobalIndex = NULL;
2561 Buffer_Recv_GlobalIndex =
new unsigned long[
size*MaxLocalPoint];
2565 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2566 nGlobal_Poin += Buffer_Recv_nPoint[iProcessor];
2569 for (iVar = 0; iVar < nVar_Total; iVar++) {
2570 Data[iVar] =
new su2double[nGlobal_Poin];
2580 for (iVar = 0; iVar < nVar_Consv; iVar++) {
2585 CurrentIndex = FirstIndex;
2586 if ((SecondIndex !=
NONE) && (iVar > nVar_First-1)) {
2587 jVar = iVar - nVar_First;
2588 CurrentIndex = SecondIndex;
2590 if ((SecondIndex !=
NONE) && (ThirdIndex !=
NONE) && (iVar > (nVar_First + nVar_Second-1))) {
2591 jVar = iVar - nVar_First - nVar_Second;
2592 CurrentIndex = ThirdIndex;
2598 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2602 if (!Local_Halo[iPoint] || Wrt_Halo) {
2615 Buffer_Send_Res[jPoint] = solver[CurrentIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
2639 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
2646 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
2654 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
2664 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_GlobalIndex[iPoint] = Buffer_Send_GlobalIndex[iPoint];
2672 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2673 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
2677 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
2679 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
2683 Data[iVar+nVar_Consv][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
2687 unsigned short ExtraIndex;
2688 ExtraIndex = nVar_Consv;
2690 Data[iVar+ExtraIndex][iGlobal_Index] = Buffer_Recv_Res[jPoint];
2698 jPoint = (iProcessor+1)*nBuffer_Scalar;
2709 if (dynamic_grid && !fem) {
2714 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2718 if (!Local_Halo[iPoint] || Wrt_Halo) {
2723 Buffer_Send_Var[jPoint] = Grid_Vel[0];
2724 Buffer_Send_Res[jPoint] = Grid_Vel[1];
2725 if (geometry->
GetnDim() == 3) Buffer_Send_Vol[jPoint] = Grid_Vel[2];
2735 if (geometry->
GetnDim() == 3) {
2739 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
2740 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
2741 if (geometry->
GetnDim() == 3) {
2742 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
2749 jPoint = 0; iVar = iVar_GridVel;
2750 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2751 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
2755 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
2756 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
2757 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
2759 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
2765 jPoint = (iProcessor+1)*nBuffer_Scalar;
2784 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2788 if (!Local_Halo[iPoint] || Wrt_Halo) {
2796 Buffer_Send_Res[jPoint] = 0.0;
2811 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
2812 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
2813 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
2819 jPoint = 0; iVar = iVar_PressCp;
2820 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2821 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
2825 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
2826 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
2827 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
2828 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
2834 jPoint = (iProcessor+1)*nBuffer_Scalar;
2848 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2852 if (!Local_Halo[iPoint] || Wrt_Halo) {
2857 Buffer_Send_Var[jPoint] = sqrt(solver[
FLOW_SOL]->GetNodes()->GetVelocity2(iPoint))/
2860 if (incompressible) {
2873 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
2879 jPoint = 0; iVar = iVar_MachMean;
2880 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2881 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
2885 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
2886 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
2892 jPoint = (iProcessor+1)*nBuffer_Scalar;
2906 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2910 if (!Local_Halo[iPoint] || Wrt_Halo) {
2925 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
2931 jPoint = 0; iVar = iVar_Lam;
2932 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2933 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
2937 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
2938 Data[iVar][iGlobal_Index] = Buffer_Recv_Res[jPoint];
2944 jPoint = (iProcessor+1)*nBuffer_Scalar;
2955 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2956 Aux_Frict_x[iPoint] = 0.0;
2957 Aux_Frict_y[iPoint] = 0.0;
2958 Aux_Frict_z[iPoint] = 0.0;
2962 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2966 if (geometry->
GetnDim() == 3) Aux_Frict_z[iPoint] = solver[
FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 2);
2973 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2977 if (!Local_Halo[iPoint] || Wrt_Halo) {
2981 Buffer_Send_Var[jPoint] = Aux_Frict_x[iPoint];
2982 Buffer_Send_Res[jPoint] = Aux_Frict_y[iPoint];
2984 Buffer_Send_Vol[jPoint] = Aux_Frict_z[iPoint];
2994 if (geometry->
GetnDim() == 3) {
2998 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++)
2999 Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3000 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++)
3001 Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3002 if (geometry->
GetnDim() == 3) {
3003 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++)
3004 Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3012 iVar = iVar_ViscCoeffs;
3013 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3014 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3018 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3019 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3020 Data[iVar + 1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3022 Data[iVar + 2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3028 jPoint = (iProcessor + 1) * nBuffer_Scalar;
3039 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3040 Aux_Heat[iPoint] = 0.0;
3041 Aux_yPlus[iPoint] = 0.0;
3045 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3055 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3059 if (!Local_Halo[iPoint] || Wrt_Halo) {
3064 Buffer_Send_Res[jPoint] = Aux_Heat[iPoint];
3065 Buffer_Send_Vol[jPoint] = Aux_yPlus[iPoint];
3067 if (incompressible) {
3068 Buffer_Send_Res[jPoint] = Aux_Heat[iPoint];
3069 Buffer_Send_Vol[jPoint] = Aux_yPlus[iPoint];
3081 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++)
3082 Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3083 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++)
3084 Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3091 iVar = iVar_HeatCoeffs;
3093 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3094 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3098 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3099 Data[iVar + 0][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3100 Data[iVar + 1][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3106 jPoint = (iProcessor + 1) * nBuffer_Scalar;
3119 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3123 if (!Local_Halo[iPoint] || Wrt_Halo) {
3138 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3144 jPoint = 0; iVar = iVar_Eddy;
3145 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3146 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3150 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3151 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3157 jPoint = (iProcessor+1)*nBuffer_Scalar;
3173 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3177 if (!Local_Halo[iPoint] || Wrt_Halo) {
3191 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3197 jPoint = 0; iVar = iVar_Sharp;
3198 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3199 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3203 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3204 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3210 jPoint = (iProcessor+1)*nBuffer_Scalar;
3233 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) Aux_Sens[iPoint] = 0.0;
3236 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3240 for (iDim = 0; iDim < nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
3249 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3253 if (!Local_Halo[iPoint] || Wrt_Halo) {
3257 Buffer_Send_Var[jPoint] = Aux_Sens[iPoint];
3274 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3276 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3282 jPoint = 0; iVar = iVar_Sens;
3283 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3284 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3288 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3289 Data[iVar+0][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3291 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3297 jPoint = (iProcessor+1)*nBuffer_Scalar;
3311 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3315 if (!Local_Halo[iPoint] || Wrt_Halo) {
3335 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3336 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3338 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3344 jPoint = 0; iVar = iVar_SensDim;
3345 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3346 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3350 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3351 Data[iVar+0][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3352 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3354 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3360 jPoint = (iProcessor+1)*nBuffer_Scalar;
3373 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3377 if (!Local_Halo[iPoint] || Wrt_Halo) {
3382 Buffer_Send_Var[jPoint] = Node_Vel[0];
3383 Buffer_Send_Res[jPoint] = Node_Vel[1];
3384 if (geometry->
GetnDim() == 3) Buffer_Send_Vol[jPoint] = Node_Vel[2];
3394 if (geometry->
GetnDim() == 3) {
3398 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3399 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3400 if (geometry->
GetnDim() == 3) {
3401 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3408 jPoint = 0; iVar = iVar_FEA_Vel;
3409 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3410 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3414 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3415 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3416 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3418 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3424 jPoint = (iProcessor+1)*nBuffer_Scalar;
3436 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3440 if (!Local_Halo[iPoint] || Wrt_Halo) {
3445 Buffer_Send_Var[jPoint] = Node_Accel[0];
3446 Buffer_Send_Res[jPoint] = Node_Accel[1];
3447 if (geometry->
GetnDim() == 3) Buffer_Send_Vol[jPoint] = Node_Accel[2];
3457 if (geometry->
GetnDim() == 3) {
3461 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3462 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3463 if (geometry->
GetnDim() == 3) {
3464 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3471 jPoint = 0; iVar = iVar_FEA_Accel;
3472 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3473 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3477 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3478 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3479 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3481 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3487 jPoint = (iProcessor+1)*nBuffer_Scalar;
3499 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3503 if (!Local_Halo[iPoint] || Wrt_Halo) {
3509 Buffer_Send_Var[jPoint] = Stress[0];
3511 Buffer_Send_Res[jPoint] = Stress[1];
3513 Buffer_Send_Vol[jPoint] = Stress[2];
3525 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3526 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3527 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3533 jPoint = 0; iVar = iVar_FEA_Stress;
3534 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3535 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3539 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3540 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3541 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3542 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3548 jPoint = (iProcessor+1)*nBuffer_Scalar;
3560 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3564 if (!Local_Halo[iPoint] || Wrt_Halo) {
3570 Buffer_Send_Var[jPoint] = Stress[3];
3572 Buffer_Send_Res[jPoint] = Stress[4];
3574 Buffer_Send_Vol[jPoint] = Stress[5];
3586 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3587 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3588 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3595 jPoint = 0; iVar = iVar_FEA_Stress_3D;
3596 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3597 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3601 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3602 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3603 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3604 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3610 jPoint = (iProcessor+1)*nBuffer_Scalar;
3622 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3626 if (!Local_Halo[iPoint] || Wrt_Halo) {
3640 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3646 jPoint = 0; iVar = iVar_FEA_Extra;
3647 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3648 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3652 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3653 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3659 jPoint = (iProcessor+1)*nBuffer_Scalar;
3668 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3672 if (!Local_Halo[iPoint] || Wrt_Halo) {
3679 Buffer_Send_Vol[jPoint] = solver[
ADJFEA_SOL]->GetNodes()->GetGeometry_CrossTerm_Derivative(iPoint, 2);
3692 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3693 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3695 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3701 jPoint = 0; iVar = iVar_FEA_Extra;
3702 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3703 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3707 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3708 Data[iVar+0][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3709 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3711 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3717 jPoint = (iProcessor+1)*nBuffer_Scalar;
3724 for (jVar = 0; jVar < nVar_Extra; jVar++) {
3729 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3733 if (!Local_Halo[iPoint] || Wrt_Halo) {
3737 if (Kind_Solver ==
RANS) {
3750 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3756 jPoint = 0; iVar = iVar_Extra;
3757 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3758 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3762 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3763 Data[iVar+jVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3769 jPoint = (iProcessor+1)*nBuffer_Scalar;
3779 delete [] Buffer_Send_Var;
3780 delete [] Buffer_Send_Res;
3781 delete [] Buffer_Send_Vol;
3782 delete [] Buffer_Send_GlobalIndex;
3784 delete [] Buffer_Recv_nPoint;
3785 delete [] Buffer_Recv_Var;
3786 delete [] Buffer_Recv_Res;
3787 delete [] Buffer_Recv_Vol;
3788 delete [] Buffer_Recv_GlobalIndex;
3793 delete [] Local_Halo;
3798 delete[] Aux_Frict_x;
delete[] Aux_Frict_y;
delete[] Aux_Frict_z;
3799 delete [] Aux_Heat;
delete [] Aux_yPlus;
3818 unsigned short iVar;
3819 unsigned long iPoint = 0, jPoint = 0;
3821 nVar_Total = config->
fields.size() - 1;
3830 unsigned short iMarker;
3831 unsigned long iVertex, nTotalPoints = 0;
3835 int *Local_Halo =
new int[geometry->
GetnPoint()];
3836 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
3839 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
3842 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3847 Local_Halo[iPoint] =
false;
3856 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
3857 if (!Local_Halo[iPoint]) nTotalPoints++;
3859 nGlobal_Poin = nTotalPoints;
3861 for (iVar = 0; iVar < nVar_Total; iVar++) {
3862 Data[iVar] =
new su2double[nGlobal_Poin];
3869 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3870 if (!Local_Halo[iPoint]) {
3874 unsigned short jVar = 0;
3875 for (iVar = 0; iVar < nVar_Total; iVar++) {
3892 int nProcessor =
size, iProcessor;
3896 unsigned long iVertex, iMarker;
3897 unsigned long Buffer_Send_nPoint[1], *Buffer_Recv_nPoint = NULL;
3898 unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
3899 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
3901 int *Local_Halo =
new int[geometry->
GetnPoint()];
3902 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
3905 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
3914 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
3920 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3924 if (isPeriodic) Local_Halo[iPoint] =
false;
3931 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
3932 if (Local_Halo[iPoint] ==
false)
3936 Buffer_Send_nPoint[0] = nLocalPoint;
3938 if (
rank ==
MASTER_NODE) Buffer_Recv_nPoint =
new unsigned long[nProcessor];
3943 nBuffer_Scalar = MaxLocalPoint;
3950 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
3951 unsigned long *Buffer_Recv_GlobalIndex = NULL;
3956 Buffer_Recv_Var =
new su2double[nProcessor*MaxLocalPoint];
3957 Buffer_Recv_GlobalIndex =
new unsigned long[nProcessor*MaxLocalPoint];
3961 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
3962 nGlobal_Poin += Buffer_Recv_nPoint[iProcessor];
3965 for (iVar = 0; iVar < nVar_Total; iVar++) {
3966 Data[iVar] =
new su2double[nGlobal_Poin];
3977 for (iVar = 0; iVar < nVar_Total; iVar++) {
3981 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3984 if (!Local_Halo[iPoint] || Wrt_Halo) {
4007 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
4008 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
4011 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
4012 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
4016 jPoint = (iProcessor+1)*nBuffer_Scalar;
4023 delete [] Buffer_Send_Var;
4024 delete [] Buffer_Send_GlobalIndex;
4026 delete [] Buffer_Recv_Var;
4027 delete [] Buffer_Recv_GlobalIndex;
4032 delete [] Local_Halo;
4040 unsigned short nZone = geometry->
GetnZone();
4042 unsigned short iVar, iDim, nDim = geometry->
GetnDim();
4043 unsigned long iPoint, iExtIter = config->
GetInnerIter();
4048 ofstream restart_file;
4050 string filename, meta_filename;
4075 }
else if ((fem || disc_adj_fem) && (config->
GetWrt_Dynamic())) {
4081 restart_file.open(filename.c_str(), ios::out);
4082 restart_file.precision(15);
4086 restart_file <<
"\"PointID\"";
4091 restart_file <<
"\t\"x\"\t\"y\"";
4093 restart_file <<
"\t\"x\"\t\"y\"\t\"z\"";
4096 for (iVar = 0; iVar < nVar_Consv; iVar++) {
4098 restart_file <<
"\t\"Displacement_" << iVar+1<<
"\"";
4100 restart_file <<
"\t\"Conservative_" << iVar+1<<
"\"";
4104 for (iVar = 0; iVar < nVar_Consv; iVar++) {
4105 restart_file <<
"\t\"Limiter_" << iVar+1<<
"\"";
4109 for (iVar = 0; iVar < nVar_Consv; iVar++) {
4110 restart_file <<
"\t\"Residual_" << iVar+1<<
"\"";
4116 if (dynamic_grid && !fem) {
4118 restart_file <<
"\t\"Grid_Velx\"\t\"Grid_Vely\"";
4120 restart_file <<
"\t\"Grid_Velx\"\t\"Grid_Vely\"\t\"Grid_Velz\"";
4127 restart_file <<
"\t\"Pressure\"\t\"Temperature\"\t\"Pressure_Coefficient\"\t\"Mach\"";
4129 restart_file <<
"\t\"Pressure\"\t\"Temperature\"\t\"C<sub>p</sub>\"\t\"Mach\"";
4135 if (nDim == 2) restart_file <<
"\t\"Laminar_Viscosity\"\t\"Skin_Friction_Coefficient_X\"\t\"Skin_Friction_Coefficient_Y\"\t\"Heat_Flux\"\t\"Y_Plus\"";
4136 if (nDim == 3) restart_file <<
"\t\"Laminar_Viscosity\"\t\"Skin_Friction_Coefficient_X\"\t\"Skin_Friction_Coefficient_Y\"\t\"Skin_Friction_Coefficient_Z\"\t\"Heat_Flux\"\t\"Y_Plus\"";
4138 if (nDim == 2) restart_file <<
"\t\"<greek>m</greek>\"\t\"C<sub>f</sub>_x\"\t\"C<sub>f</sub>_y\"\t\"h\"\t\"y<sup>+</sup>\"";
4139 if (nDim == 3) restart_file <<
"\t\"<greek>m</greek>\"\t\"C<sub>f</sub>_x\"\t\"C<sub>f</sub>_y\"\t\"C<sub>f</sub>_z\"\t\"h\"\t\"y<sup>+</sup>\"";
4145 restart_file <<
"\t\"Eddy_Viscosity\"";
4147 restart_file <<
"\t\"<greek>m</greek><sub>t</sub>\"";
4153 restart_file <<
"\t\"Sharp_Edge_Dist\"";
4160 restart_file <<
"\t\"Surface_Sensitivity\"\t\"Solution_Sensor\"";
4168 restart_file <<
"\t\"Surface_Sensitivity\"\t\"Sensitivity_x\"\t\"Sensitivity_y\"";
4169 if (geometry->
GetnDim() == 3) {
4170 restart_file <<
"\t\"Sensitivity_z\"";
4177 restart_file <<
"\t\"Sxx\"\t\"Syy\"\t\"Sxy\"\t\"Von_Mises_Stress\"";
4179 restart_file <<
"\t\"Sxx\"\t\"Syy\"\t\"Sxy\"\t\"Szz\"\t\"Sxz\"\t\"Syz\"\t\"Von_Mises_Stress\"";
4181 else if (dynamic_fem) {
4182 if (geometry->
GetnDim() == 2) {
4183 restart_file <<
"\t\"Velocity_1\"\t\"Velocity_2\"\t\"Acceleration_1\"\t\"Acceleration_2\"";
4184 restart_file <<
"\t\"Sxx\"\t\"Syy\"\t\"Sxy\"\t\"Von_Mises_Stress\"";
4186 if (geometry->
GetnDim() == 3) {
4187 restart_file <<
"\t\"Velocity_1\"\t\"Velocity_2\"\t\"Velocity_3\"\t\"Acceleration_1\"\t\"Acceleration_2\"\t\"Acceleration_3\"";
4188 restart_file <<
"\t\"Sxx\"\t\"Syy\"\t\"Sxy\"\t\"Szz\"\t\"Sxz\"\t\"Syz\"\t\"Von_Mises_Stress\"";
4195 restart_file <<
"\t\"CrossTerm_1\"\t\"CrossTerm_2\"";
4197 restart_file <<
"\t\"CrossTerm_1\"\t\"CrossTerm_2\"\t\"CrossTerm_3\"";
4202 string *headings = NULL;
4207 for (iVar = 0; iVar < nVar_Extra; iVar++) {
4208 if (headings == NULL) {
4209 restart_file <<
"\t\"ExtraOutput_" << iVar+1<<
"\"";
4211 restart_file <<
"\t\""<< headings[iVar] <<
"\"";
4217 restart_file <<
"\n";
4228 unsigned long nPointTotal = 0;
4235 for (iPoint = 0; iPoint < nPointTotal; iPoint++) {
4238 restart_file << iPoint <<
"\t";
4241 for (iDim = 0; iDim < nDim; iDim++) {
4242 restart_file << scientific << Coords[iDim][iPoint] <<
"\t";
4246 for (iVar = 0; iVar < nVar_Total; iVar++) {
4247 restart_file << scientific << Data[iVar][iPoint] <<
"\t";
4249 restart_file <<
"\n";
4255 restart_file <<
"EXT_ITER= " << config->
GetInnerIter() + 1 << endl;
4261 restart_file <<
"DCD_DCL_VALUE= " << config->
GetdCD_dCL() << endl;
4262 restart_file <<
"DCMX_DCL_VALUE= " << config->
GetdCMx_dCL() << endl;
4263 restart_file <<
"DCMY_DCL_VALUE= " << config->
GetdCMy_dCL() << endl;
4264 restart_file <<
"DCMZ_DCL_VALUE= " << config->
GetdCMz_dCL() << endl;
4269 restart_file.close();
4275 unsigned short iDim, nDim = geometry->
GetnDim();
4283 for (iDim = 0; iDim < nDim; iDim++) {
4284 delete [] Coords[iDim];
4297 if (nGlobal_Line > 0 && Conn_Line != NULL)
delete [] Conn_Line;
4298 if (nGlobal_BoundTria > 0 && Conn_BoundTria != NULL)
delete [] Conn_BoundTria;
4299 if (nGlobal_BoundQuad > 0 && Conn_BoundQuad != NULL)
delete [] Conn_BoundQuad;
4302 if (nGlobal_Tria > 0 && Conn_Tria != NULL)
delete [] Conn_Tria;
4303 if (nGlobal_Quad > 0 && Conn_Quad != NULL)
delete [] Conn_Quad;
4304 if (nGlobal_Tetr > 0 && Conn_Tetr != NULL)
delete [] Conn_Tetr;
4305 if (nGlobal_Hexa > 0 && Conn_Hexa != NULL)
delete [] Conn_Hexa;
4306 if (nGlobal_Pris > 0 && Conn_Pris != NULL)
delete [] Conn_Pris;
4307 if (nGlobal_Pyra > 0 && Conn_Pyra != NULL)
delete [] Conn_Pyra;
4320 for (
unsigned short iVar = 0; iVar < nVar_Total; iVar++) {
4321 delete [] Data[iVar];
4329 char cstr[200], buffer[50], turb_resid[1000], adj_turb_resid[1000];
4330 unsigned short iMarker_Monitoring;
4331 string Monitoring_Tag, monitoring_coeff, aeroelastic_coeff, turbo_coeff;
4348 bool output_comboObj = (config->
GetnObj() > 1);
4357 bool thermal =
false;
4367 string hist_ext =
".csv";
4381 strcpy (cstr, filename.data());
4383 ConvHist_file->open(cstr, ios::out);
4384 ConvHist_file->precision(15);
4388 char begin[]=
"\"Iteration\"";
4392 char flow_coeff[]=
",\"CL\",\"CD\",\"CSF\",\"CMx\",\"CMy\",\"CMz\",\"CFx\",\"CFy\",\"CFz\",\"CL/CD\",\"AoA\",\"Custom_ObjFunc\"";
4393 char heat_coeff[]=
",\"HeatFlux_Total\",\"HeatFlux_Maximum\",\"Temperature_Total\"";
4394 char equivalent_area_coeff[]=
",\"CEquivArea\",\"CNearFieldOF\"";
4395 char buffet_coeff[]=
",\"Buffet_Metric\"";
4396 char engine_coeff[]=
",\"NetThrust\",\"Power\",\"AeroCDrag\",\"SolidCDrag\",\"Radial_Distortion\",\"Circumferential_Distortion\"";
4397 char rotating_frame_coeff[]=
",\"CMerit\",\"CT\",\"CQ\"";
4398 char fem_coeff[]=
",\"VM_Stress\",\"Force_Coeff\"";
4399 char fem_incload[]=
",\"IncLoad\"";
4400 char adj_coeff[]=
",\"Sens_Geo\",\"Sens_Mach\",\"Sens_AoA\",\"Sens_Press\",\"Sens_Temp\",\"Sens_AoS\"";
4401 char adj_inc_coeff[]=
",\"Sens_Geo\",\"Sens_Vin\",\"Sens_Pout\",\"Sens_Temp\"";
4402 char adj_turbo_coeff[]=
",\"Sens_Geo\",\"Sens_PressOut\",\"Sens_TotTempIn\"";
4403 char surface_outputs[]=
",\"Avg_MassFlow\",\"Avg_Mach\",\"Avg_Temp\",\"Avg_Press\",\"Avg_Density\",\"Avg_Enthalpy\",\"Avg_NormalVel\",\"Uniformity\",\"Secondary_Strength\",\"Momentum_Distortion\",\"Secondary_Over_Uniformity\",\"Avg_TotalTemp\",\"Avg_TotalPress\",\"Pressure_Drop\"";
4404 char Cp_inverse_design[]=
",\"Cp_Diff\"";
4405 char Heat_inverse_design[]=
",\"HeatFlux_Diff\"";
4406 char d_flow_coeff[] =
",\"D(CL)\",\"D(CD)\",\"D(CSF)\",\"D(CMx)\",\"D(CMy)\",\"D(CMz)\",\"D(CFx)\",\"D(CFy)\",\"D(CFz)\",\"D(CL/CD)\",\"D(Custom_ObjFunc)\"";
4407 char d_thermal_coeff[] =
",\"D(HeatFlux_Total)\",\"D(HeatFlux_Maximum)\"";
4408 char d_engine[] =
",\"D(NetThrust)\",\"D(Power)\",\"D(AeroCDrag)\",\"D(SolidCDrag)\",\"D(Radial_Distortion)\",\"D(Circumferential_Distortion)\"";
4409 char d_turbo_coeff[] =
",\"D(TotalPressureLoss_0)\",\"D(FlowAngleOut_0)\",\"D(TotalEfficency)\",\"D(TotalStaticEfficiency)\", \"D(EntropyGen)\"";
4410 char d_surface_outputs[]=
",\"D(Uniformity)\",\"D(Secondary_Strength)\",\"D(Momentum_Distortion)\",\"D(Secondary_Over_Uniformity)\",\"D(Pressure_Drop)\"";
4414 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
4416 monitoring_coeff +=
",\"CL_" + Monitoring_Tag +
"\"";
4417 monitoring_coeff +=
",\"CD_" + Monitoring_Tag +
"\"";
4418 monitoring_coeff +=
",\"CSF_" + Monitoring_Tag +
"\"";
4419 monitoring_coeff +=
",\"CL/CD_" + Monitoring_Tag +
"\"";
4420 monitoring_coeff +=
",\"CFx_" + Monitoring_Tag +
"\"";
4421 monitoring_coeff +=
",\"CFy_" + Monitoring_Tag +
"\"";
4422 monitoring_coeff +=
",\"CFz_" + Monitoring_Tag +
"\"";
4423 monitoring_coeff +=
",\"CMx_" + Monitoring_Tag +
"\"";
4424 monitoring_coeff +=
",\"CMy_" + Monitoring_Tag +
"\"";
4425 monitoring_coeff +=
",\"CMz_" + Monitoring_Tag +
"\"";
4426 if(buffet) monitoring_coeff +=
",\"Buffet_Metric_" + Monitoring_Tag +
"\"";
4427 aeroelastic_coeff +=
",\"plunge_" + Monitoring_Tag +
"\"";
4428 aeroelastic_coeff +=
",\"pitch_" + Monitoring_Tag +
"\"";
4435 tag << iMarker_Monitoring + 1;
4437 turbo_coeff +=
",\"TotalPressureLoss_" + tag.str() +
"\"";
4438 turbo_coeff +=
",\"KineticEnergyLoss_" + tag.str() +
"\"";
4439 turbo_coeff +=
",\"EntropyGen_" + tag.str() +
"\"";
4440 turbo_coeff +=
",\"EulerianWork_" + tag.str() +
"\"";
4441 turbo_coeff +=
",\"PressureRatio_" + tag.str() +
"\"";
4442 turbo_coeff +=
",\"FlowAngleIn_" + tag.str() +
"\"";
4443 turbo_coeff +=
",\"FlowAngleOut_" + tag.str() +
"\"";
4444 turbo_coeff +=
",\"AbsFlowAngleIn_" + tag.str() +
"\"";
4445 turbo_coeff +=
",\"AbsFlowAngleOut_" + tag.str() +
"\"";
4446 turbo_coeff +=
",\"MassFlowIn_" + tag.str() +
"\"";
4447 turbo_coeff +=
",\"MassFlowOut_" + tag.str() +
"\"";
4448 turbo_coeff +=
",\"MachIn_" + tag.str() +
"\"";
4449 turbo_coeff +=
",\"MachOut_" + tag.str() +
"\"";
4451 turbo_coeff +=
",\"TotalEfficiency_" + tag.str() +
"\"";
4452 turbo_coeff +=
",\"TotalStaticEfficiency_" + tag.str() +
"\"";
4457 char combo_obj[] =
",\"ComboObj\"";
4461 char flow_resid[]=
",\"Res_Flow[0]\",\"Res_Flow[1]\",\"Res_Flow[2]\",\"Res_Flow[3]\",\"Res_Flow[4]\"";
4462 char adj_flow_resid[]=
",\"Res_AdjFlow[0]\",\"Res_AdjFlow[1]\",\"Res_AdjFlow[2]\",\"Res_AdjFlow[3]\",\"Res_AdjFlow[4]\"";
4465 SPRINTF (turb_resid,
",\"Res_Turb[0]\"");
4468 SPRINTF (turb_resid,
",\"Res_Turb[0]\",\"Res_Turb[1]\"");
4473 SPRINTF (adj_turb_resid,
",\"Res_AdjTurb[0]\"");
4476 SPRINTF (adj_turb_resid,
",\"Res_AdjTurb[0]\",\"Res_AdjTurb[1]\"");
4479 char fem_resid[]=
",\"Res_FEM[0]\",\"Res_FEM[1]\",\"Res_FEM[2]\"";
4480 char heat_resid[]=
",\"Res_Heat\"";
4484 char end[]=
",\"Linear_Solver_Iterations\",\"CFL_Number\",\"Time(min)\"\n";
4485 char endfea[]=
",\"Linear_Solver_Iterations\",\"Time(min)\"\n";
4489 ConvHist_file[0] <<
"TITLE = \"SU2 Simulation\"" << endl;
4490 ConvHist_file[0] <<
"VARIABLES = ";
4500 ConvHist_file[0] << begin;
4501 if (!turbo) ConvHist_file[0] << flow_coeff;
4502 if (buffet) ConvHist_file[0] << buffet_coeff;
4503 if (turbo) ConvHist_file[0] << turbo_coeff;
4504 if (thermal && !turbo) ConvHist_file[0] << heat_coeff;
4505 if (equiv_area) ConvHist_file[0] << equivalent_area_coeff;
4506 if (engine || actuator_disk) ConvHist_file[0] << engine_coeff;
4508 ConvHist_file[0] << Cp_inverse_design;
4509 if (thermal && !turbo) ConvHist_file[0] << Heat_inverse_design;
4511 if (rotating_frame && !turbo) ConvHist_file[0] << rotating_frame_coeff;
4513 ConvHist_file[0] << flow_resid;
4514 if (turbulent) ConvHist_file[0] << turb_resid;
4515 if (weakly_coupled_heat) ConvHist_file[0] << heat_resid;
4516 if (aeroelastic) ConvHist_file[0] << aeroelastic_coeff;
4517 if (output_per_surface) ConvHist_file[0] << monitoring_coeff;
4518 if (output_surface) ConvHist_file[0] << surface_outputs;
4520 if (!turbo) ConvHist_file[0] << d_flow_coeff;
4521 else ConvHist_file[0] << d_turbo_coeff;
4522 if (engine || actuator_disk) ConvHist_file[0] << d_engine;
4523 if (thermal) ConvHist_file[0] << d_thermal_coeff;
4524 if (output_surface) ConvHist_file[0] << d_surface_outputs;
4526 if (output_comboObj) ConvHist_file[0] << combo_obj;
4527 ConvHist_file[0] << end;
4536 ConvHist_file[0] << begin << adj_coeff << adj_flow_resid;
4538 if (incompressible) {
4539 ConvHist_file[0] << begin << adj_inc_coeff << adj_flow_resid;
4542 else ConvHist_file[0] << begin << adj_turbo_coeff << adj_flow_resid;
4543 if ((turbulent) && (!frozen_visc)) ConvHist_file[0] << adj_turb_resid;
4544 ConvHist_file[0] << end;
4548 ConvHist_file[0] << begin << heat_coeff;
4549 ConvHist_file[0] << heat_resid << end;
4553 ConvHist_file[0] << begin << fem_coeff;
4554 if (incload) ConvHist_file[0] << fem_incload;
4555 ConvHist_file[0] << fem_resid << endfea;
4559 ConvHist_file[0] << begin << fem_coeff;
4560 ConvHist_file[0] << fem_resid << endfea;
4567 ConvHist_file[0] <<
"ZONE T= \"Convergence history\"" << endl;
4575 CSolver *****solver_container,
4578 bool DualTime_Iteration,
4580 unsigned short val_iZone,
4581 unsigned short val_iInst) {
4584 bool output_comboObj = (config[val_iZone]->
GetnObj() > 1);
4587 unsigned long iIntIter = config[val_iZone]->
GetInnerIter();
4588 unsigned long iExtIter = config[val_iZone]->
GetInnerIter();
4589 unsigned short FinestMesh = config[val_iZone]->
GetFinestMesh();
4590 unsigned short nZone = config[val_iZone]->
GetnZone();
4597 bool output_files =
true;
4602 if (!disc_adj && !cont_adj && !DualTime_Iteration) {
4605 (solver_container[val_iZone][val_iInst][
MESH_0][
FLOW_SOL]->GetStart_AoA_FD()) &&
4607 output_files =
false;
4610 if (fea || fluid_structure) output_files =
false;
4614 if (((iExtIter % (config[val_iZone]->GetWrt_Sol_Freq())) == 0) ||
4615 (!fixed_cl && (iExtIter == (config[val_iZone]->GetnInner_Iter()-1))) ||
4617 (fixed_cl && (iExtIter == (config[val_iZone]->GetnInner_Iter()-2) ||
4618 (solver_container[val_iZone][val_iInst][
MESH_0][
FLOW_SOL]->GetStart_AoA_FD() &&
4619 iExtIter == solver_container[val_iZone][val_iInst][
MESH_0][
FLOW_SOL]->GetIter_Update_AoA())))) {
4622 if ((
rank ==
MASTER_NODE) && output_files) cout << endl <<
"------------------------ Evaluate Special Output ------------------------";
4624 switch (config[val_iZone]->GetKind_Solver()) {
4630 if (config[val_iZone]->GetnMarker_Analyze() != 0) {
4632 geometry[val_iZone][val_iInst][
MESH_0], config[val_iZone], output_files);
4637 if ((config[val_iZone]->GetnMarker_Analyze() != 0) && compressible) {
4639 geometry[val_iZone][val_iInst][
MESH_0], config[val_iZone], output_files);
4644 if (config[val_iZone]->GetnMarker_NearFieldBound() != 0) {
4646 geometry[val_iZone][val_iInst][
MESH_0], config[val_iZone], output_files);
4651 if (config[val_iZone]->GetPlot_Section_Forces()) {
4653 geometry[val_iZone][val_iInst][
MESH_0], config[val_iZone], output_files);
4667 if (config[val_iZone]->GetBoolTurbomachinery()) {
4675 if ((
rank ==
MASTER_NODE) && output_files) cout <<
"-------------------------------------------------------------------------" << endl << endl;
4687 if (output_comboObj) {
4689 switch (config[val_iZone]->GetKind_Solver()) {
4705 char begin[1000], direct_coeff[1000], heat_coeff[1000], equivalent_area_coeff[1000], engine_coeff[1000], rotating_frame_coeff[1000], Cp_inverse_design[1000], Heat_inverse_design[1000], surface_coeff[1000], aeroelastic_coeff[1000], monitoring_coeff[10000], buffet_coeff[1000],
4706 adjoint_coeff[1000], flow_resid[1000], adj_flow_resid[1000], turb_resid[1000], trans_resid[1000],
4707 adj_turb_resid[1000],
4708 begin_fem[1000], fem_coeff[1000], heat_resid[1000], combo_obj[1000],
4709 fem_resid[1000], end[1000], end_fem[1000], surface_outputs[1000], d_surface_outputs[1000], d_direct_coeff[1000], turbo_coeff[10000];
4713 unsigned short iVar, iMarker_Monitoring;
4715 unsigned long LinSolvIter = 0, iPointMaxResid;
4718 unsigned short nDim = geometry[val_iZone][val_iInst][FinestMesh]->
GetnDim();
4724 bool engine = ((config[val_iZone]->
GetnMarker_EngineInflow() != 0) || (config[val_iZone]->GetnMarker_EngineExhaust() != 0));
4725 bool actuator_disk = ((config[val_iZone]->
GetnMarker_ActDiskInlet() != 0) || (config[val_iZone]->GetnMarker_ActDiskOutlet() != 0));
4731 (config[val_iZone]->GetKind_Solver() ==
DISC_ADJ_RANS) || config[val_iZone]->GetKind_Solver() ==
INC_RANS ||
4733 bool adjoint = cont_adj || disc_adj;
4734 bool frozen_visc = (cont_adj && config[val_iZone]->
GetFrozen_Visc_Cont()) ||( disc_adj && config[val_iZone]->GetFrozen_Visc_Disc());
4738 (config[val_iZone]->GetKind_Solver() ==
RANS) || (config[val_iZone]->GetKind_Solver() ==
FEM_EULER) ||
4740 (config[val_iZone]->GetKind_Solver() ==
FEM_LES) || (config[val_iZone]->GetKind_Solver() ==
ADJ_EULER) ||
4743 (config[val_iZone]->GetKind_Solver() ==
INC_RANS);
4747 (config[val_iZone]->GetKind_Solver() ==
DISC_ADJ_FEM));
4759 unsigned short direct_diff = config[val_iZone]->
GetDirectDiff();
4762 bool extra_heat_output =
false;
4767 if (ExtraHeatOutputZone > -1) {
4768 if (ExtraHeatOutputZone > nZone) {
4771 else if ((config[ExtraHeatOutputZone]->GetKind_Solver() !=
HEAT_EQUATION_FVM)) {
4775 extra_heat_output =
true;
4781 su2double Total_CL = 0.0, Total_CD = 0.0, Total_CSF = 0.0, Total_CMx = 0.0, Total_CMy = 0.0, Total_CMz = 0.0, Total_CEff = 0.0,
4782 Total_CEquivArea = 0.0, Total_CNearFieldOF = 0.0, Total_CFx = 0.0, Total_CFy = 0.0, Total_CFz = 0.0, Total_CMerit = 0.0,
4783 Total_CT = 0.0, Total_CQ = 0.0,
4784 Total_Heat = 0.0, Total_MaxHeat = 0.0, Total_Temperature = 0.0, Total_Custom_ObjFunc = 0.0,
4785 Total_ComboObj = 0.0, Total_NetThrust = 0.0, Total_Power = 0.0, Total_AeroCD = 0.0, Total_SolidCD = 0.0, Total_IDR = 0.0, Total_IDC = 0.0,
4786 Total_AoA = 0.0, Total_Buffet_Metric = 0.0;
4787 su2double Surface_MassFlow = 0.0, Surface_Mach = 0.0, Surface_Temperature = 0.0, Surface_Pressure = 0.0, Surface_Density = 0.0, Surface_Enthalpy = 0.0, Surface_NormalVelocity = 0.0, Surface_TotalTemperature = 0.0, Surface_TotalPressure = 0.0, Surface_Uniformity = 0.0, Surface_SecondaryStrength = 0.0,Surface_MomentumDistortion = 0.0, Surface_SecondOverUniform = 0.0, Surface_PressureDrop = 0.0;
4789 su2double Total_ForceCoeff = 0.0, Total_VMStress = 0.0, Total_IncLoad = 0.0;
4790 su2double Total_SensE = 0.0, Total_SensNu = 0.0;
4792 unsigned short iSpan;
4795 su2double Total_Sens_Geo = 0.0, Total_Sens_Mach = 0.0, Total_Sens_AoA = 0.0;
4796 su2double Total_Sens_Press = 0.0, Total_Sens_Temp = 0.0;
4802 su2double D_Total_CL = 0.0, D_Total_CD = 0.0, D_Total_CSF = 0.0, D_Total_CMx = 0.0, D_Total_CMy = 0.0, D_Total_CMz = 0.0, D_Total_CEff = 0.0, D_Total_CFx = 0.0,
4803 D_Total_CFy = 0.0, D_Total_CFz = 0.0, D_Total_NetThrust = 0.0, D_Total_Power = 0.0, D_Total_AeroCD = 0.0, D_Total_SolidCD = 0.0, D_Total_IDR = 0.0, D_Total_IDC = 0.0, D_Total_Custom_ObjFunc = 0.0, D_Total_Heat = 0.0, D_Total_MaxHeat = 0.0,
4804 D_TotalPressure_Loss = 0.0, D_FlowAngle_Out = 0.0, D_TotalStaticEfficiency = 0.0,
4805 D_TotalTotalEfficiency = 0.0, D_EntropyGen = 0.0,
4806 D_Surface_Uniformity = 0.0, D_Surface_SecondaryStrength = 0.0, D_Surface_MomentumDistortion = 0.0, D_Surface_SecondOverUniform = 0.0, D_Surface_PressureDrop = 0.0;
4810 *residual_turbulent = NULL,
4811 *residual_transition = NULL;
4813 *residual_adjturbulent = NULL,
4814 *residual_adjheat = NULL;
4821 *aeroelastic_pitch = NULL,
4824 *Surface_CSF = NULL,
4825 *Surface_CEff = NULL,
4826 *Surface_CFx = NULL,
4827 *Surface_CFy = NULL,
4828 *Surface_CFz = NULL,
4829 *Surface_CMx = NULL,
4830 *Surface_CMy = NULL,
4831 *Surface_CMz = NULL,
4832 *Surface_Buffet_Metric = NULL;
4835 unsigned short nVar_Flow = 0, nVar_Turb = 0,
4836 nVar_Trans = 0, nVar_Heat = 0,
4837 nVar_AdjFlow = 0, nVar_AdjTurb = 0, nVar_AdjHeat = 0,
4841 if (compressible) nVar_Flow = nDim+2;
else nVar_Flow = nDim+2;
4843 switch (config[val_iZone]->GetKind_Turb_Model()) {
4848 if (transition) nVar_Trans = 2;
4849 if (heat) nVar_Heat = 1;
4852 if (linear_analysis) nVar_FEM = nDim;
4853 if (nonlinear_analysis) nVar_FEM = 3;
4855 if (config[val_iZone]->GetKind_Solver() ==
DISC_ADJ_FEM) nVar_FEM = nDim;
4860 if (compressible) nVar_AdjFlow = nDim+2;
else nVar_AdjFlow = nDim+2;
4862 switch (config[val_iZone]->GetKind_Turb_Model()) {
4867 if (weakly_coupled_heat) nVar_AdjHeat = 1;
4870 residual_flow =
new su2double[nVar_Flow];
4871 residual_turbulent =
new su2double[nVar_Turb];
4872 residual_transition =
new su2double[nVar_Trans];
4873 residual_heat =
new su2double[nVar_Heat];
4876 residual_adjflow =
new su2double[nVar_AdjFlow];
4877 residual_adjturbulent =
new su2double[nVar_AdjTurb];
4878 residual_adjheat =
new su2double[nVar_AdjHeat];
4882 aeroelastic_pitch =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
4886 Surface_CEff =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
4893 if(buffet) Surface_Buffet_Metric =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
4897 switch (config[val_iZone]->GetKind_Solver()) {
4919 Total_AoA = config[val_iZone]->GetAoA() - config[val_iZone]->GetAoA_Offset();
4927 if(weakly_coupled_heat) {
4957 if (engine || actuator_disk) {
4972 Total_CEquivArea = config[val_iZone]->GetWeightCd()*Total_CD + (1.0-config[val_iZone]->GetWeightCd())*Total_CEquivArea;
4973 Total_CNearFieldOF = config[val_iZone]->GetWeightCd()*Total_CD + (1.0-config[val_iZone]->GetWeightCd())*Total_CNearFieldOF;
4976 if (engine || actuator_disk) {
4985 if (rotating_frame) {
4993 for (iMarker_Monitoring = 0; iMarker_Monitoring < config[
ZONE_0]->GetnMarker_Monitoring(); iMarker_Monitoring++) {
4994 aeroelastic_plunge[iMarker_Monitoring] = config[val_iZone]->GetAeroelastic_plunge(iMarker_Monitoring);
4995 aeroelastic_pitch[iMarker_Monitoring] = config[val_iZone]->GetAeroelastic_pitch(iMarker_Monitoring);
4999 if (output_per_surface) {
5001 for (iMarker_Monitoring = 0; iMarker_Monitoring < config[
ZONE_0]->GetnMarker_Monitoring(); iMarker_Monitoring++) {
5002 Surface_CL[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CL(iMarker_Monitoring);
5003 Surface_CD[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CD(iMarker_Monitoring);
5004 Surface_CSF[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CSF(iMarker_Monitoring);
5005 Surface_CEff[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CEff(iMarker_Monitoring);
5006 Surface_CFx[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CFx(iMarker_Monitoring);
5007 Surface_CFy[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CFy(iMarker_Monitoring);
5008 Surface_CFz[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CFz(iMarker_Monitoring);
5009 Surface_CMx[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CMx(iMarker_Monitoring);
5010 Surface_CMy[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CMy(iMarker_Monitoring);
5011 Surface_CMz[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CMz(iMarker_Monitoring);
5013 if(buffet) Surface_Buffet_Metric[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_Buffet_Metric(iMarker_Monitoring);
5019 for (iMarker_Monitoring = 0; iMarker_Monitoring < nTurboPerf; iMarker_Monitoring++) {
5020 for(iSpan=0; iSpan<nSpanWiseSections+1; iSpan++){
5021 if ((iMarker_Monitoring == 0) && (direct_diff !=
NO_DERIVATIVE)){
5036 if (output_surface) {
5038 unsigned short iMarker_Analyze = 0;
5039 Surface_MassFlow = config[
ZONE_0]->GetSurface_MassFlow(iMarker_Analyze);
5040 Surface_Mach = config[
ZONE_0]->GetSurface_Mach(iMarker_Analyze);
5041 Surface_Temperature = config[
ZONE_0]->GetSurface_Temperature(iMarker_Analyze);
5042 Surface_Pressure = config[
ZONE_0]->GetSurface_Pressure(iMarker_Analyze);
5043 Surface_Density = config[
ZONE_0]->GetSurface_Density(iMarker_Analyze);
5044 Surface_Enthalpy = config[
ZONE_0]->GetSurface_Enthalpy(iMarker_Analyze);
5045 Surface_NormalVelocity = config[
ZONE_0]->GetSurface_NormalVelocity(iMarker_Analyze);
5046 Surface_Uniformity = config[
ZONE_0]->GetSurface_Uniformity(iMarker_Analyze);
5047 Surface_SecondaryStrength = config[
ZONE_0]->GetSurface_SecondaryStrength(iMarker_Analyze);
5048 Surface_MomentumDistortion = config[
ZONE_0]->GetSurface_MomentumDistortion(iMarker_Analyze);
5049 Surface_SecondOverUniform = config[
ZONE_0]->GetSurface_SecondOverUniform(iMarker_Analyze);
5050 Surface_TotalTemperature = config[
ZONE_0]->GetSurface_TotalTemperature(iMarker_Analyze);
5051 Surface_TotalPressure = config[
ZONE_0]->GetSurface_TotalPressure(iMarker_Analyze);
5052 Surface_PressureDrop = config[
ZONE_0]->GetSurface_PressureDrop(iMarker_Analyze);
5065 for (iVar = 0; iVar < nVar_Flow; iVar++)
5066 residual_flow[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetRes_RMS(iVar);
5071 for (iVar = 0; iVar < nVar_Turb; iVar++)
5072 residual_turbulent[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
TURB_SOL]->GetRes_RMS(iVar);
5075 if (weakly_coupled_heat) {
5076 for (iVar = 0; iVar < nVar_Heat; iVar++) {
5077 residual_heat[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
HEAT_SOL]->
GetRes_RMS(iVar);
5085 for (iVar = 0; iVar < nVar_Trans; iVar++)
5086 residual_transition[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
TRANS_SOL]->GetRes_RMS(iVar);
5098 LinSolvIter = (
unsigned long) solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetIterLinSolver();
5116 for (iVar = 0; iVar < nVar_AdjFlow; iVar++) {
5117 residual_adjflow[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
ADJFLOW_SOL]->
GetRes_RMS(iVar);
5124 for (iVar = 0; iVar < nVar_AdjTurb; iVar++)
5125 residual_adjturbulent[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
ADJTURB_SOL]->GetRes_RMS(iVar);
5129 if (weakly_coupled_heat) {
5130 for (iVar = 0; iVar < nVar_Heat; iVar++) {
5131 residual_adjheat[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
ADJHEAT_SOL]->
GetRes_RMS(iVar);
5150 for (iVar = 0; iVar < nVar_Heat; iVar++) {
5151 residual_heat[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
HEAT_SOL]->
GetRes_RMS(iVar);
5162 Total_ForceCoeff = solver_container[val_iZone][val_iInst][FinestMesh][
FEA_SOL]->
GetForceCoeff();
5166 LinSolvIter = (
unsigned long) solver_container[val_iZone][val_iInst][FinestMesh][
FEA_SOL]->GetIterLinSolver();
5172 if (linear_analysis) {
5173 for (iVar = 0; iVar < nVar_FEM; iVar++) {
5174 residual_fem[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
FEA_SOL]->
GetRes_RMS(iVar);
5177 else if (nonlinear_analysis) {
5178 for (iVar = 0; iVar < nVar_FEM; iVar++) {
5179 residual_fem[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
FEA_SOL]->
GetRes_FEM(iVar);
5194 for (iVar = 0; iVar < nVar_FEM; iVar++) {
5195 residual_fem[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
ADJFEA_SOL]->
GetRes_RMS(iVar);
5203 if (extra_heat_output) {
5206 Extra_Heat_Residual = log10(solver_container[ExtraHeatOutputZone][val_iInst][FinestMesh][
HEAT_SOL]->GetRes_RMS(0));
5211 bool Unsteady = ((config[val_iZone]->GetTime_Marching() ==
DT_STEPPING_1ST) ||
5213 bool In_NoDualTime = (!DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5214 bool In_DualTime_0 = (DualTime_Iteration && (iIntIter % config[val_iZone]->GetWrt_Con_Freq_DualTime() == 0));
5215 bool In_DualTime_1 = (!DualTime_Iteration && Unsteady);
5216 bool In_DualTime_2 = (Unsteady && DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5217 bool In_DualTime_3 = (Unsteady && !DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5224 bool dynamic = (config[val_iZone]->GetTime_Domain());
5225 bool In_NoDynamic = (!DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5226 bool In_Dynamic_0 = (DualTime_Iteration && (iIntIter % config[val_iZone]->GetWrt_Con_Freq_DualTime() == 0));
5227 bool In_Dynamic_1 = (!DualTime_Iteration && nonlinear_analysis);
5228 bool In_Dynamic_2 = (nonlinear_analysis && DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5229 bool In_Dynamic_3 = (nonlinear_analysis && !DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5232 if (Unsteady) write_heads = (iIntIter == 0);
5233 else write_heads = (((iExtIter % (config[val_iZone]->GetWrt_Con_Freq()*40)) == 0));
5235 bool write_turbo = (((iExtIter % (config[val_iZone]->GetWrt_Con_Freq()*40)) == 0) || (iExtIter == (config[val_iZone]->GetnInner_Iter() -1)));
5238 bool write_heads_FEM;
5239 if (nonlinear_analysis) write_heads_FEM = (iIntIter == 0);
5240 else write_heads_FEM = (((iExtIter % (config[val_iZone]->GetWrt_Con_Freq()*40)) == 0));
5242 if ( (!fem && ((In_NoDualTime || In_DualTime_0 || In_DualTime_1) && (In_NoDualTime || In_DualTime_2 || In_DualTime_3))) ||
5243 (fem && ( (In_NoDynamic || In_Dynamic_0 || In_Dynamic_1) && (In_NoDynamic || In_Dynamic_2 || In_Dynamic_3)))
5249 if (!DualTime_Iteration) {
5255 SPRINTF (end,
", %12.10f, %12.10f, %12.10f\n",
su2double(LinSolvIter), config[val_iZone]->GetCFL(
MESH_0), timeused/60.0);
5258 switch (config[val_iZone]->GetKind_Solver()) {
5268 SPRINTF (direct_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",
5269 Total_CL, Total_CD, Total_CSF, Total_CMx, Total_CMy, Total_CMz, Total_CFx, Total_CFy,
5270 Total_CFz, Total_CEff, Total_AoA, Total_Custom_ObjFunc);
5271 if (buffet)
SPRINTF (buffet_coeff,
", %14.8e", Total_Buffet_Metric);
5272 if (thermal || heat)
SPRINTF (heat_coeff,
", %14.8e, %14.8e, %14.8e", Total_Heat, Total_MaxHeat, Total_Temperature);
5273 if (equiv_area)
SPRINTF (equivalent_area_coeff,
", %14.8e, %14.8e", Total_CEquivArea, Total_CNearFieldOF);
5274 if (engine || actuator_disk)
SPRINTF (engine_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", Total_NetThrust, Total_Power, Total_AeroCD, Total_SolidCD, Total_IDR, Total_IDC);
5275 if (rotating_frame)
SPRINTF (rotating_frame_coeff,
", %14.8e, %14.8e, %14.8e", Total_CMerit, Total_CT, Total_CQ);
5277 SPRINTF (Cp_inverse_design,
", %14.8e", solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetTotal_CpDiff());
5278 if (thermal && !turbo)
SPRINTF (Heat_inverse_design,
", %14.8e", solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetTotal_HeatFluxDiff());
5283 SPRINTF (d_direct_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",
5284 D_Total_CL, D_Total_CD, D_Total_CSF, D_Total_CMx, D_Total_CMy, D_Total_CMz, D_Total_CFx, D_Total_CFy,
5285 D_Total_CFz, D_Total_CEff, D_Total_Custom_ObjFunc);
5287 SPRINTF (d_direct_coeff,
", %12.10f, %12.10f, %12.10f, %12.10f, %12.10f", D_TotalPressure_Loss, D_FlowAngle_Out,
5288 D_TotalTotalEfficiency, D_TotalStaticEfficiency, D_EntropyGen);
5289 if (engine || actuator_disk)
5290 SPRINTF (d_direct_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",
5291 D_Total_CL, D_Total_CD, D_Total_CSF, D_Total_CMx, D_Total_CMy, D_Total_CMz, D_Total_CFx, D_Total_CFy,
5292 D_Total_CFz, D_Total_CEff, D_Total_Custom_ObjFunc, D_Total_NetThrust, D_Total_Power, D_Total_AeroCD, D_Total_SolidCD, D_Total_IDR, D_Total_IDC);
5294 SPRINTF (d_direct_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",
5295 D_Total_CL, D_Total_CD, D_Total_CSF, D_Total_CMx, D_Total_CMy, D_Total_CMz, D_Total_CFx, D_Total_CFy,
5296 D_Total_CFz, D_Total_CEff, D_Total_Custom_ObjFunc, D_Total_Heat, D_Total_MaxHeat);
5300 for (iMarker_Monitoring = 0; iMarker_Monitoring < config[
ZONE_0]->GetnMarker_Monitoring(); iMarker_Monitoring++) {
5302 if (iMarker_Monitoring == 0) {
5303 SPRINTF(aeroelastic_coeff,
", %12.10f", aeroelastic_plunge[iMarker_Monitoring]);
5306 SPRINTF(surface_coeff,
", %12.10f", aeroelastic_plunge[iMarker_Monitoring]);
5307 strcat(aeroelastic_coeff, surface_coeff);
5309 SPRINTF(surface_coeff,
", %12.10f", aeroelastic_pitch[iMarker_Monitoring]);
5310 strcat(aeroelastic_coeff, surface_coeff);
5314 if (output_per_surface) {
5315 for (iMarker_Monitoring = 0; iMarker_Monitoring < config[
ZONE_0]->GetnMarker_Monitoring(); iMarker_Monitoring++) {
5317 if (iMarker_Monitoring == 0) {
5318 SPRINTF(monitoring_coeff,
", %12.10f", Surface_CL[iMarker_Monitoring]);
5321 SPRINTF(surface_coeff,
", %12.10f", Surface_CL[iMarker_Monitoring]);
5322 strcat(monitoring_coeff, surface_coeff);
5324 SPRINTF(surface_coeff,
", %12.10f", Surface_CD[iMarker_Monitoring]);
5325 strcat(monitoring_coeff, surface_coeff);
5326 SPRINTF(surface_coeff,
", %12.10f", Surface_CSF[iMarker_Monitoring]);
5327 strcat(monitoring_coeff, surface_coeff);
5328 SPRINTF(surface_coeff,
", %12.10f", Surface_CEff[iMarker_Monitoring]);
5329 strcat(monitoring_coeff, surface_coeff);
5330 SPRINTF(surface_coeff,
", %12.10f", Surface_CFx[iMarker_Monitoring]);
5331 strcat(monitoring_coeff, surface_coeff);
5332 SPRINTF(surface_coeff,
", %12.10f", Surface_CFy[iMarker_Monitoring]);
5333 strcat(monitoring_coeff, surface_coeff);
5334 SPRINTF(surface_coeff,
", %12.10f", Surface_CFz[iMarker_Monitoring]);
5335 strcat(monitoring_coeff, surface_coeff);
5336 SPRINTF(surface_coeff,
", %12.10f", Surface_CMx[iMarker_Monitoring]);
5337 strcat(monitoring_coeff, surface_coeff);
5338 SPRINTF(surface_coeff,
", %12.10f", Surface_CMy[iMarker_Monitoring]);
5339 strcat(monitoring_coeff, surface_coeff);
5340 SPRINTF(surface_coeff,
", %12.10f", Surface_CMz[iMarker_Monitoring]);
5341 strcat(monitoring_coeff, surface_coeff);
5344 SPRINTF(surface_coeff,
", %12.10f", Surface_Buffet_Metric[iMarker_Monitoring]);
5345 strcat(monitoring_coeff, surface_coeff);
5351 for (iMarker_Monitoring = 0; iMarker_Monitoring < config[
ZONE_0]->GetnMarker_TurboPerformance(); iMarker_Monitoring++){
5352 if (iMarker_Monitoring == 0){
5353 SPRINTF(turbo_coeff,
", %12.10f", TotalPressureLoss[iMarker_Monitoring][nSpanWiseSections]);
5355 SPRINTF(surface_coeff,
", %12.10f", TotalPressureLoss[iMarker_Monitoring][nSpanWiseSections]);
5356 strcat(turbo_coeff, surface_coeff);
5358 SPRINTF(surface_coeff,
", %12.10f", KineticEnergyLoss[iMarker_Monitoring][nSpanWiseSections]);
5359 strcat(turbo_coeff, surface_coeff);
5360 SPRINTF(surface_coeff,
", %12.10f", EntropyGen[iMarker_Monitoring][nSpanWiseSections]);
5361 strcat(turbo_coeff, surface_coeff);
5362 SPRINTF(surface_coeff,
", %12.10f", EulerianWork[iMarker_Monitoring][nSpanWiseSections]);
5363 strcat(turbo_coeff, surface_coeff);
5364 SPRINTF(surface_coeff,
", %12.10f", PressureRatio[iMarker_Monitoring][nSpanWiseSections]);
5365 strcat(turbo_coeff, surface_coeff);
5366 SPRINTF(surface_coeff,
", %12.10f", 180.0/
PI_NUMBER*FlowAngleIn[iMarker_Monitoring][nSpanWiseSections]);
5367 strcat(turbo_coeff, surface_coeff);
5368 SPRINTF(surface_coeff,
", %12.10f", 180.0/
PI_NUMBER*FlowAngleOut[iMarker_Monitoring][nSpanWiseSections]);
5369 strcat(turbo_coeff, surface_coeff);
5370 SPRINTF(surface_coeff,
", %12.10f", 180.0/
PI_NUMBER*AbsFlowAngleIn[iMarker_Monitoring][nSpanWiseSections]);
5371 strcat(turbo_coeff, surface_coeff);
5372 SPRINTF(surface_coeff,
", %12.10f", 180.0/
PI_NUMBER*AbsFlowAngleOut[iMarker_Monitoring][nSpanWiseSections]);
5373 strcat(turbo_coeff, surface_coeff);
5374 SPRINTF(surface_coeff,
", %12.10f", MassFlowIn[iMarker_Monitoring][nSpanWiseSections]);
5375 strcat(turbo_coeff, surface_coeff);
5376 SPRINTF(surface_coeff,
", %12.10f", MassFlowOut[iMarker_Monitoring][nSpanWiseSections]);
5377 strcat(turbo_coeff, surface_coeff);
5378 SPRINTF(surface_coeff,
", %12.10f", sqrt(MachIn[iMarker_Monitoring][nSpanWiseSections][1]*MachIn[iMarker_Monitoring][nSpanWiseSections][1] + MachIn[iMarker_Monitoring][nSpanWiseSections][0]*MachIn[iMarker_Monitoring][nSpanWiseSections][0]));
5379 strcat(turbo_coeff, surface_coeff);
5380 SPRINTF(surface_coeff,
", %12.10f", sqrt(MachOut[iMarker_Monitoring][nSpanWiseSections][1]*MachOut[iMarker_Monitoring][nSpanWiseSections][1] + MachOut[iMarker_Monitoring][nSpanWiseSections][0]*MachOut[iMarker_Monitoring][nSpanWiseSections][0]));
5381 strcat(turbo_coeff, surface_coeff);
5383 SPRINTF(surface_coeff,
", %12.10f", TotalTotalEfficiency[iMarker_Monitoring][nSpanWiseSections]);
5384 strcat(turbo_coeff, surface_coeff);
5385 SPRINTF(surface_coeff,
", %12.10f", TotalStaticEfficiency[iMarker_Monitoring][nSpanWiseSections]);
5386 strcat(turbo_coeff, surface_coeff);
5394 if (compressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), dummy);
5395 if (incompressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), dummy);
5398 if (compressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), log10 (residual_flow[4]) );
5399 if (incompressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), log10 (residual_flow[4]));
5405 case 1:
SPRINTF (turb_resid,
", %12.10f", log10 (residual_turbulent[0]));
break;
5406 case 2:
SPRINTF (turb_resid,
", %12.10f, %12.10f", log10(residual_turbulent[0]), log10(residual_turbulent[1]));
break;
5412 if (output_surface) {
5413 SPRINTF( surface_outputs,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", Surface_MassFlow, Surface_Mach, Surface_Temperature, Surface_Pressure, Surface_Density, Surface_Enthalpy, Surface_NormalVelocity, Surface_Uniformity, Surface_SecondaryStrength, Surface_MomentumDistortion, Surface_SecondOverUniform, Surface_TotalTemperature, Surface_TotalPressure, Surface_PressureDrop);
5416 SPRINTF( d_surface_outputs,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",
5417 D_Surface_Uniformity, D_Surface_SecondaryStrength, D_Surface_MomentumDistortion, D_Surface_SecondOverUniform, D_Surface_PressureDrop);
5423 SPRINTF (trans_resid,
", %12.10f, %12.10f", log10(residual_transition[0]), log10(residual_transition[1]));
5427 if (output_comboObj) {
5428 SPRINTF(combo_obj,
", %12.10f", Total_ComboObj);
5442 SPRINTF (adjoint_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, 0.0", Total_Sens_Geo, Total_Sens_Mach, Total_Sens_AoA, Total_Sens_Press, Total_Sens_Temp);
5444 if (incompressible) {
5445 SPRINTF (adjoint_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e", Total_Sens_Geo, Total_Sens_ModVel, Total_Sens_BPressure, Total_Sens_Temp);
5448 SPRINTF (adjoint_coeff,
", %14.8e, %14.8e, %14.8e", Total_Sens_Geo, Total_Sens_BPressure, Total_Sens_Temp);
5452 if (compressible)
SPRINTF (adj_flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, 0.0", log10 (residual_adjflow[0]), log10 (residual_adjflow[1]), log10 (residual_adjflow[2]), log10 (residual_adjflow[3]) );
5453 if (incompressible)
SPRINTF (adj_flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, 0.0", log10 (residual_adjflow[0]), log10 (residual_adjflow[1]), log10 (residual_adjflow[2]), log10 (residual_adjflow[3]) );
5456 if (compressible)
SPRINTF (adj_flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_adjflow[0]), log10 (residual_adjflow[1]), log10 (residual_adjflow[2]), log10 (residual_adjflow[3]), log10 (residual_adjflow[4]) );
5457 if (incompressible)
SPRINTF (adj_flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_adjflow[0]), log10 (residual_adjflow[1]), log10 (residual_adjflow[2]), log10 (residual_adjflow[3]), log10 (residual_adjflow[4]));
5463 if (nVar_AdjTurb == 1) {
5464 SPRINTF (adj_turb_resid,
", %14.8e", log10 (residual_adjturbulent[0]));
5465 }
else if (nVar_AdjTurb > 1) {
5466 SPRINTF (adj_turb_resid,
", %14.8e, %14.8e", log10 (residual_adjturbulent[0]), log10 (residual_adjturbulent[1]));
5472 if (weakly_coupled_heat) {
5473 SPRINTF (heat_resid,
", %14.8e", log10 (residual_heat[0]));
5480 SPRINTF (direct_coeff,
", %14.8e, %14.8e, %14.8e", Total_Heat, Total_MaxHeat, Total_Temperature);
5481 SPRINTF (heat_resid,
", %14.8e", log10 (residual_heat[0]));
5487 SPRINTF (begin_fem,
", %14.8e", 0.0);
5489 if (incload)
SPRINTF (fem_coeff,
", %14.8e, %14.8e, %14.8e", Total_VMStress, Total_ForceCoeff, Total_IncLoad);
5490 else SPRINTF (fem_coeff,
", %14.8e, %14.8e", Total_VMStress, Total_ForceCoeff);
5493 if (linear_analysis)
SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), dummy);
5494 if (nonlinear_analysis)
SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), log10 (residual_fem[2]));
5497 SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), log10 (residual_fem[2]));
5499 SPRINTF (end_fem,
", %lu, %12.10f\n", LinSolvIter, timeused/60.0);
5505 SPRINTF (direct_coeff,
", %12.10f", Total_VMStress);
5507 SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), dummy, dummy, dummy);
5510 SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), log10 (residual_fem[2]), dummy, dummy);
5517 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
5519 if ( (!fem && ((write_heads) && !(!DualTime_Iteration && Unsteady))) ||
5520 (fem && ((write_heads_FEM) && !(!DualTime_Iteration && nonlinear_analysis)))
5524 if (!Unsteady && (config[val_iZone]->GetTime_Marching() !=
TIME_STEPPING)) {
5525 switch (config[val_iZone]->GetKind_Solver()) {
5531 cout << endl <<
"---------------------- Local Time Stepping Summary ----------------------" << endl;
5533 for (
unsigned short iMesh = FinestMesh; iMesh <= config[val_iZone]->GetnMGLevels(); iMesh++)
5534 cout <<
"MG level: "<< iMesh <<
" -> Min. DT: " << solver_container[val_iZone][val_iInst][iMesh][
FLOW_SOL]->GetMin_Delta_Time()<<
5536 ". CFL: " << config[val_iZone]->GetCFL(iMesh) <<
"." << endl;
5539 cout <<
"CFL in zone 2: " << config[1]->GetCFL(
MESH_0) << endl;
5541 cout <<
"-------------------------------------------------------------------------" << endl;
5544 cout << endl <<
"---------------------- Direct Differentiation Summary -------------------" << endl;
5545 cout <<
"Coefficients are differentiated with respect to ";
5546 switch (direct_diff) {
5548 cout <<
"Mach number." << endl;
5551 cout <<
"AoA." << endl;
5554 cout <<
"AoS." << endl;
5557 cout <<
"Reynolds number." << endl;
5560 cout <<
"Turb/Lam ratio." << endl;
5563 cout <<
"Freestream Pressure." << endl;
5566 cout <<
"Freestream Temperature." << endl;
5569 cout <<
"Freestream Density." << endl;
5572 cout <<
"Freestream Viscosity." << endl;
5575 cout <<
"Design Variables." << endl;
5581 cout <<
" D_CLift(Total)" <<
" D_CDrag(Total)" <<
" D_CMz(Total)" <<
" D_CEff(Total)" << endl;
5582 cout.width(18); cout << D_Total_CL;
5583 cout.width(18); cout << D_Total_CD;
5584 cout.width(18); cout << D_Total_CMz;
5585 cout.width(18); cout << D_Total_CEff;
5586 cout << endl <<
"-------------------------------------------------------------------------" << endl;
5589 if (turbo && write_turbo && val_iZone== 0){
5598 cout <<
"------------------------ Discrete Adjoint Summary -----------------------" << endl;
5599 cout <<
"Total Geometry Sensitivity (updated every " << config[val_iZone]->GetWrt_Sol_Freq() <<
" iterations): ";
5601 cout.setf(ios::scientific, ios::floatfield);
5602 cout << Total_Sens_Geo;
5603 cout << endl <<
"-------------------------------------------------------------------------" << endl;
5610 if ((config[val_iZone]->GetTime_Marching() ==
TIME_STEPPING) && (config[val_iZone]->GetUnst_CFL()== 0.0))
5612 cout << endl <<
"Min DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMin_Delta_Time()<<
".Max DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMax_Delta_Time() <<
".Time step: " << config[val_iZone]->GetDelta_UnstTimeND() <<
".";
5613 }
else if ((config[val_iZone]->GetTime_Marching() ==
TIME_STEPPING) && (config[val_iZone]->GetUnst_CFL()!= 0.0)) {
5614 cout << endl <<
"Min DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMin_Delta_Time()<<
".Max DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMax_Delta_Time() <<
". Time step: " << solver_container[val_iZone][val_iInst][config[val_iZone]->GetFinestMesh()][
FLOW_SOL]->
GetMin_Delta_Time() <<
". CFL: " << config[val_iZone]->GetUnst_CFL()<<
".";
5616 cout << endl <<
"Min DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMin_Delta_Time()<<
".Max DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMax_Delta_Time() <<
".Dual Time step: " << config[val_iZone]->GetDelta_UnstTimeND() <<
".";
5619 cout << endl <<
"Dual Time step: " << config[val_iZone]->GetDelta_UnstTimeND() <<
".";
5623 else if (fem && !fsi) {
5625 cout << endl <<
"Simulation time: " << config[val_iZone]->GetCurrent_DynTime() <<
". Time step: " << config[val_iZone]->GetDelta_DynTime() <<
".";
5629 switch (config[val_iZone]->GetKind_Solver()) {
5635 iPointMaxResid = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetPoint_Max(0);
5638 cout << endl <<
"----------------------- Residual Evolution Summary ----------------------" << endl;
5640 cout <<
"log10[Maximum residual]: " << log10(solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetRes_Max(0)) <<
"." << endl;
5642 if (config[val_iZone]->GetSystemMeasurements() ==
SI) {
5643 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0] <<
", " << Coord[1];
5644 if (nDim == 3) cout <<
", " << Coord[2];
5645 cout <<
")." << endl;
5648 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0]*12.0 <<
", " << Coord[1]*12.0;
5649 if (nDim == 3) cout <<
", " << Coord[2]*12.0;
5650 cout <<
")." << endl;
5655 if (config[val_iZone]->GetNonphysical_Points() > 0)
5656 cout <<
"There are " << config[val_iZone]->GetNonphysical_Points() <<
" non-physical points in the solution." << endl;
5657 if (config[val_iZone]->GetNonphysical_Reconstr() > 0)
5658 cout <<
"There are " << config[val_iZone]->GetNonphysical_Reconstr() <<
" non-physical states in the upwind reconstruction." << endl;
5660 cout <<
"-------------------------------------------------------------------------" << endl;
5662 if (!Unsteady) cout << endl <<
" Iter" <<
" Time(s)";
5663 else cout << endl <<
" IntIter" <<
" ExtIter";
5666 if (incompressible && !weakly_coupled_heat) {
5667 if (energy) {cout <<
" Res[Press]" <<
" Res[Temp]" <<
" CLift(Total)" <<
" CDrag(Total)" << endl;}
5668 else {cout <<
" Res[Press]" <<
" Res[Velx]" <<
" CLift(Total)" <<
" CDrag(Total)" << endl;}
5670 else if (incompressible && weakly_coupled_heat) cout <<
" Res[Press]" <<
" Res[Heat]" <<
" HFlux(Total)";
5671 else if (rotating_frame && nDim == 3 && !turbo) cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" CThrust(Total)" <<
" CTorque(Total)" << endl;
5672 else if (aeroelastic) cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" CLift(Total)" <<
" CDrag(Total)" <<
" plunge" <<
" pitch" << endl;
5673 else if (equiv_area) cout <<
" Res[Rho]" <<
" CLift(Total)" <<
" CDrag(Total)" <<
" CPress(N-F)" << endl;
5679 cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" TotPresLoss(%)" <<
" Entropy Gen.(%)";
5683 cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" TTEfficiency(%)" <<
" Entropy Gen.(%)";
5687 else if (actuator_disk) cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" CL(Total)" <<
" CD-CT(Total)";
5688 else if (engine) cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" CL(Total)" <<
" CD-CT(Total)";
5689 else cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" CL(Total)" <<
" CD(Total)";
5691 if(extra_heat_output) {
5692 cout <<
" Res[Heat]" <<
" HFlux(Total)";
5702 iPointMaxResid = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetPoint_Max(0);
5705 cout << endl <<
"----------------------- Residual Evolution Summary ----------------------" << endl;
5707 cout <<
"log10[Maximum residual]: " << log10(solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetRes_Max(0)) <<
"." << endl;
5708 if (config[val_iZone]->GetSystemMeasurements() ==
SI) {
5709 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0] <<
", " << Coord[1];
5710 if (nDim == 3) cout <<
", " << Coord[2];
5711 cout <<
")." << endl;
5714 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0]*12.0 <<
", " << Coord[1]*12.0;
5715 if (nDim == 3) cout <<
", " << Coord[2]*12.0;
5716 cout <<
")." << endl;
5718 cout <<
"Maximum Omega " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetOmega_Max() <<
", maximum Strain Rate " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetStrainMag_Max() <<
"." << endl;
5721 if (config[val_iZone]->GetNonphysical_Points() > 0)
5722 cout <<
"There are " << config[val_iZone]->GetNonphysical_Points() <<
" non-physical points in the solution." << endl;
5723 if (config[val_iZone]->GetNonphysical_Reconstr() > 0)
5724 cout <<
"There are " << config[val_iZone]->GetNonphysical_Reconstr() <<
" non-physical states in the upwind reconstruction." << endl;
5726 cout <<
"-------------------------------------------------------------------------" << endl;
5728 if (!Unsteady) cout << endl <<
" Iter" <<
" Time(s)";
5729 else cout << endl <<
" IntIter" <<
" ExtIter";
5730 if (incompressible) cout <<
" Res[Press]";
5731 else cout <<
" Res[Rho]";
5733 switch (config[val_iZone]->GetKind_Turb_Model()) {
5735 case SST:
case SST_SUST: cout <<
" Res[kine]" <<
" Res[omega]";
break;
5738 if (weakly_coupled_heat) {
5739 cout <<
" Res[Heat]";
5742 if (transition) { cout <<
" Res[Int]" <<
" Res[Re]"; }
5743 else if (rotating_frame && nDim == 3 && !turbo ) cout <<
" CThrust(Total)" <<
" CTorque(Total)";
5744 else if (aeroelastic) cout <<
" CLift(Total)" <<
" CDrag(Total)" <<
" plunge" <<
" pitch";
5745 else if (equiv_area) cout <<
" CLift(Total)" <<
" CDrag(Total)" <<
" CPress(N-F)";
5749 cout <<
" TotPresLoss(%)" <<
" Entropy Gen.(%)";
5753 cout <<
" TTEfficiency(%)" <<
" Entropy Gen.(%)";
5757 else if (weakly_coupled_heat) {
5758 cout <<
" HFlux(Total)";
5760 else cout <<
" CLift(Total)" <<
" CDrag(Total)";
5762 if(extra_heat_output) {
5763 cout <<
" Res[Heat]" <<
" HFlux(Total)";
5771 if (!Unsteady) cout << endl <<
" Iter" <<
" Time(s)";
5772 else cout << endl <<
" IntIter" <<
" ExtIter";
5774 cout <<
" Res[Heat]" <<
" HFlux(Total)";
5778 if (!nonlinear_analysis) cout << endl <<
" Iter" <<
" Time(s)";
5779 else cout << endl <<
" IntIter" <<
" ExtIter";
5781 if (linear_analysis) {
5782 if (nDim == 2) cout <<
" Res[Displx]" <<
" Res[Disply]" <<
" VMS(Max)"<< endl;
5783 if (nDim == 3) cout <<
" Res[Displx]" <<
" Res[Disply]" <<
" Res[Displz]" <<
" VMS(Max)"<< endl;
5785 else if (nonlinear_analysis) {
5786 switch (config[val_iZone]->GetResidual_Criteria_FEM()) {
5788 cout <<
" Res[UTOL]" <<
" Res[RTOL]" <<
" Res[ETOL]" <<
" VMS(Max)"<< endl;
5791 cout <<
" Res[UTOL-A]" <<
" Res[RTOL-A]" <<
" Res[ETOL-A]" <<
" VMS(Max)"<< endl;
5794 cout <<
" Res[UTOL]" <<
" Res[RTOL]" <<
" Res[ETOL]" <<
" VMS(Max)"<< endl;
5807 cout << endl <<
"log10[Maximum residual]: " << log10(solver_container[val_iZone][val_iInst][FinestMesh][
ADJFLOW_SOL]->GetRes_Max(0)) <<
"." << endl;
5808 if (config[val_iZone]->GetSystemMeasurements() ==
SI) {
5809 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0] <<
", " << Coord[1];
5810 if (nDim == 3) cout <<
", " << Coord[2];
5811 cout <<
")." << endl;
5814 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0]*12.0 <<
", " << Coord[1]*12.0;
5815 if (nDim == 3) cout <<
", " << Coord[2]*12.0;
5816 cout <<
")." << endl;
5820 if (config[val_iZone]->GetNonphysical_Points() > 0)
5821 cout <<
"There are " << config[val_iZone]->GetNonphysical_Points() <<
" non-physical points in the solution." << endl;
5823 if (!Unsteady) cout << endl <<
" Iter" <<
" Time(s)";
5824 else cout << endl <<
" IntIter" <<
" ExtIter";
5826 if (incompressible) {
5827 if (energy) {cout <<
" Res[Psi_Press]" <<
" Res[Psi_Temp]";}
5828 else {cout <<
" Res[Psi_Press]" <<
" Res[Psi_Velx]";}
5830 else cout <<
" Res[Psi_Rho]" <<
" Res[Psi_E]";
5834 cout <<
" Sens_Press" <<
" Sens_AoA" << endl;
5836 if (incompressible) {
5838 cout <<
" Sens_Vin" <<
" Sens_Temp" << endl;
5840 cout <<
" Sens_Vin" <<
" Sens_Pout" << endl;
5843 cout <<
" Sens_PressOut" <<
" Sens_TotTempIn" << endl;
5846 cout <<
" Sens_Geo" <<
" Sens_AoA" << endl;
5855 cout << endl <<
"log10[Maximum residual]: " << log10(solver_container[val_iZone][val_iInst][FinestMesh][
ADJFLOW_SOL]->GetRes_Max(0)) <<
"." << endl;
5856 if (config[val_iZone]->GetSystemMeasurements() ==
SI) {
5857 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0] <<
", " << Coord[1];
5858 if (nDim == 3) cout <<
", " << Coord[2];
5859 cout <<
")." << endl;
5862 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0]*12.0 <<
", " << Coord[1]*12.0;
5863 if (nDim == 3) cout <<
", " << Coord[2]*12.0;
5864 cout <<
")." << endl;
5868 if (config[val_iZone]->GetNonphysical_Points() > 0)
5869 cout <<
"There are " << config[val_iZone]->GetNonphysical_Points() <<
" non-physical points in the solution." << endl;
5871 if (!Unsteady) cout << endl <<
" Iter" <<
" Time(s)";
5872 else cout << endl <<
" IntIter" <<
" ExtIter";
5874 if (incompressible) cout <<
" Res[Psi_Press]";
5875 else cout <<
" Res[Psi_Rho]";
5878 cout <<
" Res[Psi_Turb[0]]";
5881 if (incompressible) {
if (energy) {cout <<
" Res[Psi_Temp]";}
5882 else {cout <<
" Res[Psi_Velx]";}}
5883 else cout <<
" Res[Psi_E]";
5885 if (weakly_coupled_heat) {
5886 cout <<
" Res[Psi_E]";
5891 cout <<
" Sens_Press" <<
" Sens_AoA" << endl;
5893 if (incompressible) {
5894 cout <<
" Sens_Vin" <<
" Sens_Pout" << endl;
5897 cout <<
" Sens_PressOut" <<
" Sens_TotTempIn" << endl; }
5899 cout <<
" Sens_Geo" <<
" Sens_AoA" << endl;
5904 cout << endl <<
" IntIter" <<
" ExtIter";
5906 if (nDim == 2) cout <<
" Res[Ux_adj]" <<
" Res[Uy_adj]" <<
" Sens[E]" <<
" Sens[Nu]"<< endl;
5907 if (nDim == 3) cout <<
" Res[Ux_adj]" <<
" Res[Uy_adj]" <<
" Res[Uz_adj]" <<
" Sens[E]" <<
" Sens[Nu]"<< endl;
5918 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
5920 cout.setf(ios::fixed, ios::floatfield);
5923 cout.width(5); cout << iExtIter + ExtIter_OffSet;
5924 cout.width(11); cout << timeiter;
5926 }
else if (Unsteady && DualTime_Iteration) {
5927 cout.width(8); cout << iIntIter;
5928 cout.width(8); cout << iExtIter;
5932 if (!DualTime_Iteration) {
5933 if (!nonlinear_analysis) {
5934 cout.width(5); cout << iExtIter;
5935 cout.width(11); cout << timeiter;
5938 cout.width(8); cout << iIntIter;
5939 cout.width(8); cout << iExtIter;
5942 else if (discadj_fem){
5943 cout.width(8); cout << iIntIter;
5944 cout.width(8); cout << iExtIter;
5949 switch (config[val_iZone]->GetKind_Solver()) {
5956 if ((!DualTime_Iteration) && (output_files)) {
5958 config[val_iZone]->GetHistFile()[0] << begin << direct_coeff;
5959 if (buffet) config[val_iZone]->GetHistFile()[0] << buffet_coeff;
5960 if (thermal) config[val_iZone]->GetHistFile()[0] << heat_coeff;
5961 if (equiv_area) config[val_iZone]->GetHistFile()[0] << equivalent_area_coeff;
5962 if (engine || actuator_disk) config[val_iZone]->GetHistFile()[0] << engine_coeff;
5964 config[val_iZone]->GetHistFile()[0] << Cp_inverse_design;
5965 if (thermal) config[val_iZone]->GetHistFile()[0] << Heat_inverse_design;
5967 if (rotating_frame && !turbo) config[val_iZone]->GetHistFile()[0] << rotating_frame_coeff;
5968 config[val_iZone]->GetHistFile()[0] << flow_resid;
5969 if (weakly_coupled_heat) config[val_iZone]->GetHistFile()[0] << heat_resid;
5972 config[val_iZone]->GetHistFile()[0] << begin << turbo_coeff << flow_resid;
5975 if (aeroelastic) config[val_iZone]->GetHistFile()[0] << aeroelastic_coeff;
5976 if (output_per_surface) config[val_iZone]->GetHistFile()[0] << monitoring_coeff;
5977 if (output_surface) config[val_iZone]->GetHistFile()[0] << surface_outputs;
5979 config[val_iZone]->GetHistFile()[0] << d_direct_coeff;
5980 if (output_surface) config[val_iZone]->GetHistFile()[0] << d_surface_outputs;
5982 if (output_comboObj) config[val_iZone]->GetHistFile()[0] << combo_obj;
5983 config[val_iZone]->GetHistFile()[0] << end;
5984 config[val_iZone]->GetHistFile()[0].flush();
5988 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
5989 if(DualTime_Iteration || !Unsteady) {
5991 cout.setf(ios::fixed, ios::floatfield);
5992 cout.width(13); cout << log10(residual_flow[0]);
5995 if (nDim == 2 ) { cout.width(14); cout << log10(residual_flow[3]); }
5996 else { cout.width(14); cout << log10(residual_flow[4]); }
5998 if (incompressible && !weakly_coupled_heat) {
5999 if (energy) {cout.width(14); cout << log10(residual_flow[nDim+1]);}
6000 else {cout.width(14); cout << log10(residual_flow[1]);}
6002 if (incompressible && weakly_coupled_heat) { cout.width(14); cout << log10(residual_heat[0]);}
6006 if (rotating_frame && nDim == 3 && !turbo ) {
6007 cout.setf(ios::scientific, ios::floatfield);
6008 cout.width(15); cout << Total_CT;
6009 cout.width(15); cout << Total_CQ;
6010 cout.unsetf(ios_base::floatfield);
6012 else if (equiv_area) { cout.width(15); cout << min(10000.0, max(-10000.0, Total_CL)); cout.width(15); cout << min(10000.0, max(-10000.0, Total_CD)); cout.width(15);
6014 cout.setf(ios::scientific, ios::floatfield);
6015 cout << Total_CNearFieldOF; }
6017 cout.setf(ios::scientific, ios::floatfield);
6020 cout.width(15); cout << TotalPressureLoss[0][nSpanWiseSections]*100.0;
6021 cout.width(15); cout << EntropyGen[0][nSpanWiseSections]*100.0;
6024 cout.width(15); cout << TotalTotalEfficiency[nTurboPerf -1][nSpanWiseSections]*100.0;
6025 cout.width(15); cout << EntropyGen[nTurboPerf -1][nSpanWiseSections]*100.0;
6028 cout.unsetf(ios_base::floatfield);
6031 else if (weakly_coupled_heat) { cout.width(14); cout << log10(Total_Heat); }
6032 else { cout.width(15); cout << min(10000.0, max(-10000.0, Total_CL)); cout.width(15); cout << min(10000.0, max(-10000.0, Total_CD)); }
6034 cout.setf(ios::scientific, ios::floatfield);
6035 cout.width(15); cout << aeroelastic_plunge[0];
6036 cout.width(15); cout << aeroelastic_pitch[0];
6037 cout.unsetf(ios_base::floatfield);
6040 if (extra_heat_output) { cout.width(15); cout << Extra_Heat_Residual; cout.width(15); cout << Extra_Total_Heat; }
6051 if ((!DualTime_Iteration) && (output_files)) {
6054 config[val_iZone]->GetHistFile()[0] << begin << direct_coeff;
6055 if (buffet) config[val_iZone]->GetHistFile()[0] << buffet_coeff;
6056 if (thermal) config[val_iZone]->GetHistFile()[0] << heat_coeff;
6057 if (equiv_area) config[val_iZone]->GetHistFile()[0] << equivalent_area_coeff;
6058 if (engine || actuator_disk) config[val_iZone]->GetHistFile()[0] << engine_coeff;
6060 config[val_iZone]->GetHistFile()[0] << Cp_inverse_design;
6061 if (thermal) config[val_iZone]->GetHistFile()[0] << Heat_inverse_design;
6063 if (rotating_frame && !turbo) config[val_iZone]->GetHistFile()[0] << rotating_frame_coeff;
6064 config[val_iZone]->GetHistFile()[0] << flow_resid << turb_resid;
6065 if (weakly_coupled_heat) config[val_iZone]->GetHistFile()[0] << heat_resid;
6068 config[val_iZone]->GetHistFile()[0] << begin << turbo_coeff << flow_resid << turb_resid;
6071 if (aeroelastic) config[val_iZone]->GetHistFile()[0] << aeroelastic_coeff;
6072 if (output_per_surface) config[val_iZone]->GetHistFile()[0] << monitoring_coeff;
6073 if (output_surface) config[val_iZone]->GetHistFile()[0] << surface_outputs;
6075 config[val_iZone]->GetHistFile()[0] << d_direct_coeff;
6076 if (output_surface) config[val_iZone]->GetHistFile()[0] << d_surface_outputs;
6078 if (output_comboObj) config[val_iZone]->GetHistFile()[0] << combo_obj;
6079 config[val_iZone]->GetHistFile()[0] << end;
6080 config[val_iZone]->GetHistFile()[0].flush();
6085 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
6086 if(DualTime_Iteration || !Unsteady) {
6088 cout.setf(ios::fixed, ios::floatfield);
6090 if (incompressible) cout.width(13);
6091 else cout.width(14);
6092 cout << log10(residual_flow[0]);
6094 case 1: cout.width(14); cout << log10(residual_turbulent[0]);
break;
6095 case 2: cout.width(14); cout << log10(residual_turbulent[0]);
6096 cout.width(15); cout << log10(residual_turbulent[1]);
break;
6099 if (weakly_coupled_heat) {
6100 cout.width(14); cout << log10(residual_heat[0]);
6103 if (transition) { cout.width(14); cout << log10(residual_transition[0]); cout.width(14); cout << log10(residual_transition[1]); }
6105 if (rotating_frame && nDim == 3 && !turbo ) {
6106 cout.setf(ios::scientific, ios::floatfield);
6107 cout.width(15); cout << Total_CT; cout.width(15);
6109 cout.unsetf(ios_base::floatfield);
6111 else if (equiv_area) { cout.width(15); cout << min(10000.0, max(-10000.0, Total_CL)); cout.width(15); cout << min(10000.0, max(-10000.0, Total_CD)); cout.width(15);
6113 cout.setf(ios::scientific, ios::floatfield);
6114 cout << Total_CNearFieldOF; }
6116 cout.setf(ios::scientific, ios::floatfield);
6119 cout.width(15); cout << TotalPressureLoss[0][nSpanWiseSections]*100.0;
6120 cout.width(15); cout << EntropyGen[0][nSpanWiseSections]*100.0;
6124 cout.width(15); cout << TotalTotalEfficiency[nTurboPerf - 1][nSpanWiseSections]*100.0;
6125 cout.width(15); cout << EntropyGen[nTurboPerf -1][nSpanWiseSections]*100.0;
6127 cout.width(15); cout << D_EntropyGen;
6130 cout.unsetf(ios_base::floatfield);
6132 else if (weakly_coupled_heat) { cout.width(15); cout << Total_Heat; }
6133 else { cout.width(15); cout << min(10000.0, max(-10000.0, Total_CL)); cout.width(15); cout << min(10000.0, max(-10000.0, Total_CD)); }
6136 cout.setf(ios::scientific, ios::floatfield);
6137 cout.width(15); cout << aeroelastic_plunge[0];
6138 cout.width(15); cout << aeroelastic_pitch[0];
6139 cout.unsetf(ios_base::floatfield);
6142 if (extra_heat_output) { cout.width(15); cout << Extra_Heat_Residual; cout.width(15); cout << Extra_Total_Heat; }
6151 if (!DualTime_Iteration) {
6152 config[val_iZone]->GetHistFile()[0] << begin << direct_coeff << heat_resid << end;
6153 config[val_iZone]->GetHistFile()[0].flush();
6159 if (!DualTime_Iteration) {
6160 config[val_iZone]->GetHistFile()[0] << begin << fem_coeff << fem_resid << end_fem;
6161 config[val_iZone]->GetHistFile()[0].flush();
6164 cout.setf(ios::fixed, ios::floatfield);
6165 if (linear_analysis) {
6166 cout.width(14); cout << log10(residual_fem[0]);
6167 cout.width(14); cout << log10(residual_fem[1]);
6168 if (nDim == 3) { cout.width(14); cout << log10(residual_fem[2]); }
6170 else if (nonlinear_analysis) {
6171 cout.width(14); cout << log10(residual_fem[0]);
6172 cout.width(14); cout << log10(residual_fem[1]);
6173 cout.width(14); cout << log10(residual_fem[2]);
6177 cout.setf(ios::scientific, ios::floatfield);
6178 cout.width(14); cout << Total_VMStress;
6186 cout.setf(ios::fixed, ios::floatfield);
6188 cout.width(15); cout << log10(residual_fem[0]);
6189 cout.width(15); cout << log10(residual_fem[1]);
6190 if (nDim == 3) { cout.width(15); cout << log10(residual_fem[2]); }
6193 cout.setf(ios::scientific, ios::floatfield);
6196 if (config[val_iZone]->GetnElasticityMod() == 1){
6201 Total_SensE = 0.0; Total_SensNu = 0.0;
6202 for (
unsigned short iVar = 0; iVar < config[val_iZone]->GetnElasticityMod(); iVar++){
6208 Total_SensE = sqrt(Total_SensE);
6209 Total_SensNu = sqrt(Total_SensNu);
6210 cout.width(14); cout << Total_SensE;
6211 cout.width(14); cout << Total_SensNu;
6221 if (!DualTime_Iteration) {
6222 config[val_iZone]->GetHistFile()[0] << begin << adjoint_coeff << adj_flow_resid << end;
6223 config[val_iZone]->GetHistFile()[0].flush();
6225 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
6226 if (DualTime_Iteration || !Unsteady){
6228 cout.setf(ios::fixed, ios::floatfield);
6230 cout.width(15); cout << log10(residual_adjflow[0]);
6231 cout.width(15); cout << log10(residual_adjflow[nDim+1]);
6233 if (incompressible) {
6234 cout.width(17); cout << log10(residual_adjflow[0]);
6235 if (energy) {cout.width(16); cout << log10(residual_adjflow[nDim+1]);}
6236 else {cout.width(16); cout << log10(residual_adjflow[1]);}
6241 cout.setf(ios::scientific, ios::floatfield);
6244 cout.width(14); cout << Total_Sens_Press;
6245 cout.width(14); cout << Total_Sens_AoA;
6247 if (incompressible) {
6248 cout.width(14); cout << Total_Sens_ModVel;
6250 cout.width(14); cout << Total_Sens_Temp;
6252 cout.width(14); cout << Total_Sens_BPressure;
6256 cout.width(14); cout << Total_Sens_BPressure;
6257 cout.width(15); cout << Total_Sens_Temp;
6261 cout.setf(ios::scientific, ios::floatfield);
6262 cout.width(14); cout << Total_Sens_Geo;
6263 cout.width(14); cout << Total_Sens_AoA;
6266 cout.unsetf(ios_base::floatfield);
6273 if (!DualTime_Iteration) {
6274 config[val_iZone]->GetHistFile()[0] << begin << adjoint_coeff << adj_flow_resid;
6276 config[val_iZone]->GetHistFile()[0] << adj_turb_resid;
6277 config[val_iZone]->GetHistFile()[0] << end;
6278 config[val_iZone]->GetHistFile()[0].flush();
6280 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
6281 if (DualTime_Iteration || !Unsteady){
6283 cout.setf(ios::fixed, ios::floatfield);
6284 cout.width(17); cout << log10(residual_adjflow[0]);
6286 cout.width(17); cout << log10(residual_adjturbulent[0]);
6290 if (geometry[val_iZone][val_iInst][FinestMesh]->GetnDim() == 2 ) { cout.width(15); cout << log10(residual_adjflow[3]); }
6291 else { cout.width(15); cout << log10(residual_adjflow[4]); }
6293 if (incompressible) {
6294 if (energy) {cout.width(15); cout << log10(residual_adjflow[nDim+1]);}
6295 else {cout.width(15); cout << log10(residual_adjflow[1]);}
6298 if (weakly_coupled_heat) {
6299 cout.width(17); cout << log10(residual_adjheat[0]);
6304 cout.width(14); cout << Total_Sens_Press;
6305 cout.width(14); cout << Total_Sens_AoA;
6307 if (incompressible) {
6308 cout.width(14); cout << Total_Sens_ModVel;
6310 cout.width(14); cout << Total_Sens_Temp;
6312 cout.width(14); cout << Total_Sens_BPressure;
6315 cout.width(14); cout << Total_Sens_BPressure;
6316 cout.width(15); cout << Total_Sens_Temp;
6320 cout.setf(ios::scientific, ios::floatfield);
6321 cout.width(14); cout << Total_Sens_Geo;
6322 cout.width(14); cout << Total_Sens_AoA;
6325 cout.unsetf(ios_base::floatfield);
6331 cout.unsetf(ios::fixed);
6336 delete [] residual_flow;
6337 delete [] residual_turbulent;
6338 delete [] residual_transition;
6339 delete [] residual_fea;
6340 delete [] residual_fem;
6341 delete [] residual_heat;
6343 delete [] residual_adjflow;
6344 delete [] residual_adjturbulent;
6346 delete [] Surface_CL;
6347 delete [] Surface_CD;
6348 delete [] Surface_CSF;
6349 delete [] Surface_CEff;
6350 delete [] Surface_CFx;
6351 delete [] Surface_CFy;
6352 delete [] Surface_CFz;
6353 delete [] Surface_CMx;
6354 delete [] Surface_CMy;
6355 delete [] Surface_CMz;
6356 delete [] aeroelastic_pitch;
6357 delete [] aeroelastic_plunge;
6365 unsigned short iDim, iMarker_Monitoring;
6366 ofstream Breakdown_file;
6371 bool viscous = config[val_iZone]->
GetViscous();
6376 unsigned short Kind_Solver = config[val_iZone]->
GetKind_Solver();
6378 unsigned short Ref_NonDim = config[val_iZone]->
GetRef_NonDim();
6380 unsigned short FinestMesh = config[val_iZone]->
GetFinestMesh();
6381 unsigned short nDim = geometry[val_iZone][
INST_0][FinestMesh]->
GetnDim();
6384 (config[val_iZone]->GetKind_Solver() ==
RANS) ||
6385 (config[val_iZone]->GetKind_Solver() ==
INC_EULER) ||
6387 (config[val_iZone]->GetKind_Solver() ==
INC_RANS));
6393 cout << endl <<
"Writing the forces breakdown file ("<< config[val_iZone]->
GetBreakdown_FileName() <<
")." << endl;
6397 su2double Total_CL = 0.0, Total_CD = 0.0, Total_CSF = 0.0,
6398 Total_CMx = 0.0, Total_CMy = 0.0, Total_CMz = 0.0, Total_CEff = 0.0,
6399 Total_CoPx = 0.0, Total_CoPy = 0.0, Total_CoPz = 0.0,
6400 Total_CFx = 0.0, Total_CFy = 0.0, Total_CFz = 0.0, Inv_CL = 0.0,
6401 Inv_CD = 0.0, Inv_CSF = 0.0, Inv_CMx = 0.0, Inv_CMy = 0.0,
6402 Inv_CMz = 0.0, Inv_CEff = 0.0, Inv_CFx = 0.0, Inv_CFy = 0.0, Inv_CFz =
6404 Mnt_CD = 0.0, Mnt_CSF = 0.0, Mnt_CMx = 0.0, Mnt_CMy = 0.0,
6405 Mnt_CMz = 0.0, Mnt_CEff = 0.0, Mnt_CFx = 0.0, Mnt_CFy = 0.0, Mnt_CFz =
6407 Visc_CD = 0.0, Visc_CSF = 0.0, Visc_CMx = 0.0, Visc_CMy = 0.0,
6408 Visc_CMz = 0.0, Visc_CEff = 0.0, Visc_CFx = 0.0, Visc_CFy = 0.0, Visc_CFz =
6409 0.0, *Surface_CL = NULL, *Surface_CD = NULL,
6410 *Surface_CSF = NULL, *Surface_CEff = NULL, *Surface_CFx = NULL,
6411 *Surface_CFy = NULL, *Surface_CFz = NULL,
6412 *Surface_CMx = NULL, *Surface_CMy = NULL, *Surface_CMz = NULL,
6413 *Surface_CL_Inv = NULL,
6414 *Surface_CD_Inv = NULL, *Surface_CSF_Inv = NULL,
6415 *Surface_CEff_Inv = NULL, *Surface_CFx_Inv = NULL, *Surface_CFy_Inv =
6416 NULL, *Surface_CFz_Inv = NULL, *Surface_CMx_Inv = NULL,
6417 *Surface_CMy_Inv = NULL, *Surface_CMz_Inv = NULL,
6418 *Surface_CL_Visc = NULL,
6419 *Surface_CD_Visc = NULL, *Surface_CSF_Visc = NULL,
6420 *Surface_CEff_Visc = NULL, *Surface_CFx_Visc = NULL, *Surface_CFy_Visc =
6421 NULL, *Surface_CFz_Visc = NULL, *Surface_CMx_Visc = NULL,
6422 *Surface_CMy_Visc = NULL, *Surface_CMz_Visc = NULL,
6423 *Surface_CL_Mnt = NULL,
6424 *Surface_CD_Mnt = NULL, *Surface_CSF_Mnt = NULL,
6425 *Surface_CEff_Mnt = NULL, *Surface_CFx_Mnt = NULL, *Surface_CFy_Mnt =
6426 NULL, *Surface_CFz_Mnt = NULL, *Surface_CMx_Mnt = NULL,
6427 *Surface_CMy_Mnt = NULL, *Surface_CMz_Mnt = NULL;
6439 Surface_CEff =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6447 Surface_CL_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6448 Surface_CD_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6449 Surface_CSF_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6450 Surface_CEff_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6451 Surface_CFx_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6452 Surface_CFy_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6453 Surface_CFz_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6454 Surface_CMx_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6455 Surface_CMy_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6456 Surface_CMz_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6458 Surface_CL_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6459 Surface_CD_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6462 Surface_CEff_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6463 Surface_CFx_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6464 Surface_CFy_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6465 Surface_CFz_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6466 Surface_CMx_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6467 Surface_CMy_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6468 Surface_CMz_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6471 Surface_CL_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6472 Surface_CD_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6475 Surface_CEff_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6476 Surface_CFx_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6477 Surface_CFy_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6478 Surface_CFz_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6479 Surface_CMx_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6480 Surface_CMy_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6481 Surface_CMz_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6507 if (config[
ZONE_0]->GetSystemMeasurements() ==
US) { Total_CoPx *= 12.0; Total_CoPy *= 12.0; Total_CoPz *= 12.0; }
6581 for (iMarker_Monitoring = 0;
6582 iMarker_Monitoring < config[
ZONE_0]->GetnMarker_Monitoring();
6583 iMarker_Monitoring++) {
6584 Surface_CL[iMarker_Monitoring] =
6586 iMarker_Monitoring);
6587 Surface_CD[iMarker_Monitoring] =
6589 iMarker_Monitoring);
6590 Surface_CSF[iMarker_Monitoring] =
6592 iMarker_Monitoring);
6593 Surface_CEff[iMarker_Monitoring] =
6595 iMarker_Monitoring);
6596 Surface_CMx[iMarker_Monitoring] =
6598 iMarker_Monitoring);
6599 Surface_CMy[iMarker_Monitoring] =
6601 iMarker_Monitoring);
6602 Surface_CMz[iMarker_Monitoring] =
6604 iMarker_Monitoring);
6605 Surface_CFx[iMarker_Monitoring] =
6607 iMarker_Monitoring);
6608 Surface_CFy[iMarker_Monitoring] =
6610 iMarker_Monitoring);
6611 Surface_CFz[iMarker_Monitoring] =
6613 iMarker_Monitoring);
6615 Surface_CL_Inv[iMarker_Monitoring] =
6617 iMarker_Monitoring);
6618 Surface_CD_Inv[iMarker_Monitoring] =
6620 iMarker_Monitoring);
6621 Surface_CSF_Inv[iMarker_Monitoring] =
6623 iMarker_Monitoring);
6624 Surface_CEff_Inv[iMarker_Monitoring] =
6626 iMarker_Monitoring);
6627 Surface_CMx_Inv[iMarker_Monitoring] =
6629 iMarker_Monitoring);
6630 Surface_CMy_Inv[iMarker_Monitoring] =
6632 iMarker_Monitoring);
6633 Surface_CMz_Inv[iMarker_Monitoring] =
6635 iMarker_Monitoring);
6636 Surface_CFx_Inv[iMarker_Monitoring] =
6638 iMarker_Monitoring);
6639 Surface_CFy_Inv[iMarker_Monitoring] =
6641 iMarker_Monitoring);
6642 Surface_CFz_Inv[iMarker_Monitoring] =
6644 iMarker_Monitoring);
6645 Surface_CL_Visc[iMarker_Monitoring] =
6647 iMarker_Monitoring);
6648 Surface_CD_Visc[iMarker_Monitoring] =
6650 iMarker_Monitoring);
6651 Surface_CSF_Visc[iMarker_Monitoring] =
6653 iMarker_Monitoring);
6654 Surface_CEff_Visc[iMarker_Monitoring] =
6656 iMarker_Monitoring);
6657 Surface_CMx_Visc[iMarker_Monitoring] =
6659 iMarker_Monitoring);
6660 Surface_CMy_Visc[iMarker_Monitoring] =
6662 iMarker_Monitoring);
6663 Surface_CMz_Visc[iMarker_Monitoring] =
6665 iMarker_Monitoring);
6666 Surface_CFx_Visc[iMarker_Monitoring] =
6668 iMarker_Monitoring);
6669 Surface_CFy_Visc[iMarker_Monitoring] =
6671 iMarker_Monitoring);
6672 Surface_CFz_Visc[iMarker_Monitoring] =
6674 iMarker_Monitoring);
6676 Surface_CL_Mnt[iMarker_Monitoring] =
6678 iMarker_Monitoring);
6679 Surface_CD_Mnt[iMarker_Monitoring] =
6681 iMarker_Monitoring);
6682 Surface_CSF_Mnt[iMarker_Monitoring] =
6684 iMarker_Monitoring);
6685 Surface_CEff_Mnt[iMarker_Monitoring] =
6687 iMarker_Monitoring);
6688 Surface_CMx_Mnt[iMarker_Monitoring] =
6690 iMarker_Monitoring);
6691 Surface_CMy_Mnt[iMarker_Monitoring] =
6693 iMarker_Monitoring);
6694 Surface_CMz_Mnt[iMarker_Monitoring] =
6696 iMarker_Monitoring);
6697 Surface_CFx_Mnt[iMarker_Monitoring] =
6699 iMarker_Monitoring);
6700 Surface_CFy_Mnt[iMarker_Monitoring] =
6702 iMarker_Monitoring);
6703 Surface_CFz_Mnt[iMarker_Monitoring] =
6705 iMarker_Monitoring);
6712 string filename = config[val_iZone]->GetBreakdown_FileName();
6713 strcpy (cstr, filename.data());
6715 Breakdown_file.open(cstr, ios::out);
6717 Breakdown_file <<
"\n" <<
"-------------------------------------------------------------------------" <<
"\n";
6718 Breakdown_file <<
"| ___ _ _ ___ |" <<
"\n";
6719 Breakdown_file <<
"| / __| | | |_ ) Release 6.1.0 \"Falcon\" |" <<
"\n";
6720 Breakdown_file <<
"| \\__ \\ |_| |/ / |" <<
"\n";
6721 Breakdown_file <<
"| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |" <<
"\n";
6722 Breakdown_file <<
"| |" <<
"\n";
6724 Breakdown_file <<
"-------------------------------------------------------------------------" <<
"\n";
6725 Breakdown_file <<
"| The current SU2 release has been coordinated by the |" <<
"\n";
6726 Breakdown_file <<
"| SU2 International Developers Society <www.su2devsociety.org> |" <<
"\n";
6727 Breakdown_file <<
"| with selected contributions from the open-source community |" <<
"\n";
6728 Breakdown_file <<
"-------------------------------------------------------------------------" <<
"\n";
6729 Breakdown_file <<
"| The main research teams contributing to the current release are: |" <<
"\n";
6730 Breakdown_file <<
"| - Prof. Juan J. Alonso's group at Stanford University. |" <<
"\n";
6731 Breakdown_file <<
"| - Prof. Piero Colonna's group at Delft University of Technology. |" <<
"\n";
6732 Breakdown_file <<
"| - Prof. Nicolas R. Gauger's group at Kaiserslautern U. of Technology. |" <<
"\n";
6733 Breakdown_file <<
"| - Prof. Alberto Guardone's group at Polytechnic University of Milan. |" <<
"\n";
6734 Breakdown_file <<
"| - Prof. Rafael Palacios' group at Imperial College London. |" <<
"\n";
6735 Breakdown_file <<
"| - Prof. Vincent Terrapon's group at the University of Liege. |" <<
"\n";
6736 Breakdown_file <<
"| - Prof. Edwin van der Weide's group at the University of Twente. |" <<
"\n";
6737 Breakdown_file <<
"| - Lab. of New Concepts in Aeronautics at Tech. Inst. of Aeronautics. |" <<
"\n";
6738 Breakdown_file <<
"-------------------------------------------------------------------------" <<
"\n";
6739 Breakdown_file <<
"| Copyright 2012-2018, Francisco D. Palacios, Thomas D. Economon, |" <<
"\n";
6740 Breakdown_file <<
"| Tim Albring, and the SU2 contributors. |" <<
"\n";
6741 Breakdown_file <<
"| |" <<
"\n";
6742 Breakdown_file <<
"| SU2 is free software; you can redistribute it and/or |" <<
"\n";
6743 Breakdown_file <<
"| modify it under the terms of the GNU Lesser General Public |" <<
"\n";
6744 Breakdown_file <<
"| License as published by the Free Software Foundation; either |" <<
"\n";
6745 Breakdown_file <<
"| version 2.1 of the License, or (at your option) any later version. |" <<
"\n";
6746 Breakdown_file <<
"| |" <<
"\n";
6747 Breakdown_file <<
"| SU2 is distributed in the hope that it will be useful, |" <<
"\n";
6748 Breakdown_file <<
"| but WITHOUT ANY WARRANTY; without even the implied warranty of |" <<
"\n";
6749 Breakdown_file <<
"| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |" <<
"\n";
6750 Breakdown_file <<
"| Lesser General Public License for more details. |" <<
"\n";
6751 Breakdown_file <<
"| |" <<
"\n";
6752 Breakdown_file <<
"| You should have received a copy of the GNU Lesser General Public |" <<
"\n";
6753 Breakdown_file <<
"| License along with SU2. If not, see <http://www.gnu.org/licenses/>. |" <<
"\n";
6754 Breakdown_file <<
"-------------------------------------------------------------------------" <<
"\n";
6756 Breakdown_file.precision(6);
6758 Breakdown_file <<
"\n" <<
"\n" <<
"Problem definition:" <<
"\n" <<
"\n";
6760 switch (Kind_Solver) {
6762 if (compressible) Breakdown_file <<
"Compressible Euler equations." <<
"\n";
6763 if (incompressible) Breakdown_file <<
"Incompressible Euler equations." <<
"\n";
6766 if (compressible) Breakdown_file <<
"Compressible Laminar Navier-Stokes' equations." <<
"\n";
6767 if (incompressible) Breakdown_file <<
"Incompressible Laminar Navier-Stokes' equations." <<
"\n";
6770 if (compressible) Breakdown_file <<
"Compressible RANS equations." <<
"\n";
6771 if (incompressible) Breakdown_file <<
"Incompressible RANS equations." <<
"\n";
6772 Breakdown_file <<
"Turbulence model: ";
6773 switch (Kind_Turb_Model) {
6774 case SA: Breakdown_file <<
"Spalart Allmaras" <<
"\n";
break;
6775 case SA_NEG: Breakdown_file <<
"Negative Spalart Allmaras" <<
"\n";
break;
6776 case SA_E: Breakdown_file <<
"Edwards Spalart Allmaras" <<
"\n";
break;
6777 case SA_COMP: Breakdown_file <<
"Compressibility Correction Spalart Allmaras" <<
"\n";
break;
6778 case SA_E_COMP: Breakdown_file <<
"Compressibility Correction Edwards Spalart Allmaras" <<
"\n";
break;
6779 case SST: Breakdown_file <<
"Menter's SST" <<
"\n";
break;
6780 case SST_SUST: Breakdown_file <<
"Menter's SST with sustaining terms" <<
"\n";
break;
6792 Breakdown_file <<
"Mach number: " << config[val_iZone]->GetMach() <<
"."<<
"\n";
6793 Breakdown_file <<
"Angle of attack (AoA): " << config[val_iZone]->GetAoA() <<
" deg, and angle of sideslip (AoS): " << config[val_iZone]->GetAoS() <<
" deg."<<
"\n";
6796 Breakdown_file <<
"Reynolds number: " << config[val_iZone]->GetReynolds() <<
"."<<
"\n";
6800 Breakdown_file <<
"Simulation at a cte. CL: " << config[val_iZone]->GetTarget_CL() <<
".\n";
6801 Breakdown_file <<
"Approx. Delta CL / Delta AoA: " << config[val_iZone]->GetdCL_dAlpha() <<
" (1/deg).\n";
6802 Breakdown_file <<
"Approx. Delta CD / Delta CL: " << config[val_iZone]->GetdCD_dCL() <<
".\n";
6804 Breakdown_file <<
"Approx. Delta CMx / Delta CL: " << config[val_iZone]->GetdCMx_dCL() <<
".\n";
6805 Breakdown_file <<
"Approx. Delta CMy / Delta CL: " << config[val_iZone]->GetdCMy_dCL() <<
".\n";
6807 Breakdown_file <<
"Approx. Delta CMz / Delta CL: " << config[val_iZone]->GetdCMz_dCL() <<
".\n";
6810 if (Ref_NonDim ==
DIMENSIONAL) { Breakdown_file <<
"Dimensional simulation." <<
"\n"; }
6811 else if (Ref_NonDim ==
FREESTREAM_PRESS_EQ_ONE) { Breakdown_file <<
"Non-Dimensional simulation (P=1.0, Rho=1.0, T=1.0 at the farfield)." <<
"\n"; }
6812 else if (Ref_NonDim ==
FREESTREAM_VEL_EQ_MACH) { Breakdown_file <<
"Non-Dimensional simulation (V=Mach, Rho=1.0, T=1.0 at the farfield)." <<
"\n"; }
6813 else if (Ref_NonDim ==
FREESTREAM_VEL_EQ_ONE) { Breakdown_file <<
"Non-Dimensional simulation (V=1.0, Rho=1.0, T=1.0 at the farfield)." <<
"\n"; }
6815 if (config[val_iZone]->GetSystemMeasurements() ==
SI) {
6816 Breakdown_file <<
"The reference area is " << config[val_iZone]->GetRefArea() <<
" m^2." <<
"\n";
6817 Breakdown_file <<
"The reference length is " << config[val_iZone]->GetRefLength() <<
" m." <<
"\n";
6820 if (config[val_iZone]->GetSystemMeasurements() ==
US) {
6821 Breakdown_file <<
"The reference area is " << config[val_iZone]->GetRefArea()*12.0*12.0 <<
" in^2." <<
"\n";
6822 Breakdown_file <<
"The reference length is " << config[val_iZone]->GetRefLength()*12.0 <<
" in." <<
"\n";
6824 Breakdown_file <<
"\n" <<
"\n" <<
"Problem definition:" <<
"\n" <<
"\n";
6827 Breakdown_file <<
"Viscous flow: Computing pressure using the ideal gas law" <<
"\n";
6828 Breakdown_file <<
"based on the free-stream temperature and a density computed" <<
"\n";
6829 Breakdown_file <<
"from the Reynolds number." <<
"\n";
6831 Breakdown_file <<
"Inviscid flow: Computing density based on free-stream" <<
"\n";
6832 Breakdown_file <<
"temperature and pressure using the ideal gas law." <<
"\n";
6836 if (dynamic_grid) Breakdown_file <<
"Force coefficients computed using MACH_MOTION." <<
"\n";
6837 else Breakdown_file <<
"Force coefficients computed using free-stream values." <<
"\n";
6839 if (incompressible) {
6840 Breakdown_file <<
"Viscous and Inviscid flow: rho_ref, and vel_ref" <<
"\n";
6841 Breakdown_file <<
"are based on the free-stream values, p_ref = rho_ref*vel_ref^2." <<
"\n";
6842 Breakdown_file <<
"The free-stream value of the pressure is 0." <<
"\n";
6843 Breakdown_file <<
"Mach number: "<< config[val_iZone]->GetMach() <<
", computed using the Bulk modulus." <<
"\n";
6844 Breakdown_file <<
"Angle of attack (deg): "<< config[val_iZone]->GetAoA() <<
", computed using the the free-stream velocity." <<
"\n";
6845 Breakdown_file <<
"Side slip angle (deg): "<< config[val_iZone]->GetAoS() <<
", computed using the the free-stream velocity." <<
"\n";
6846 if (viscous) Breakdown_file <<
"Reynolds number: " << config[val_iZone]->GetReynolds() <<
", computed using free-stream values."<<
"\n";
6847 Breakdown_file <<
"Only dimensional computation, the grid should be dimensional." <<
"\n";
6850 Breakdown_file <<
"-- Input conditions:"<<
"\n";
6853 switch (config[val_iZone]->GetKind_FluidModel()) {
6856 Breakdown_file <<
"Fluid Model: STANDARD_AIR "<<
"\n";
6857 Breakdown_file <<
"Specific gas constant: " << config[val_iZone]->GetGas_Constant();
6858 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.m/kg.K." <<
"\n";
6859 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.ft/slug.R." <<
"\n";
6860 Breakdown_file <<
"Specific gas constant (non-dim): " << config[val_iZone]->GetGas_ConstantND()<<
"\n";
6861 Breakdown_file <<
"Specific Heat Ratio: 1.4000 "<<
"\n";
6865 Breakdown_file <<
"Fluid Model: IDEAL_GAS "<<
"\n";
6866 Breakdown_file <<
"Specific gas constant: " << config[val_iZone]->GetGas_Constant() <<
" N.m/kg.K." <<
"\n";
6867 Breakdown_file <<
"Specific gas constant (non-dim): " << config[val_iZone]->GetGas_ConstantND()<<
"\n";
6868 Breakdown_file <<
"Specific Heat Ratio: "<< config[val_iZone]->GetGamma() <<
"\n";
6872 Breakdown_file <<
"Fluid Model: Van der Waals "<<
"\n";
6873 Breakdown_file <<
"Specific gas constant: " << config[val_iZone]->GetGas_Constant() <<
" N.m/kg.K." <<
"\n";
6874 Breakdown_file <<
"Specific gas constant (non-dim): " << config[val_iZone]->GetGas_ConstantND()<<
"\n";
6875 Breakdown_file <<
"Specific Heat Ratio: "<< config[val_iZone]->GetGamma() <<
"\n";
6876 Breakdown_file <<
"Critical Pressure: " << config[val_iZone]->GetPressure_Critical() <<
" Pa." <<
"\n";
6877 Breakdown_file <<
"Critical Temperature: " << config[val_iZone]->GetTemperature_Critical() <<
" K." <<
"\n";
6878 Breakdown_file <<
"Critical Pressure (non-dim): " << config[val_iZone]->GetPressure_Critical() /config[val_iZone]->GetPressure_Ref() <<
"\n";
6879 Breakdown_file <<
"Critical Temperature (non-dim) : " << config[val_iZone]->GetTemperature_Critical() /config[val_iZone]->GetTemperature_Ref() <<
"\n";
6883 Breakdown_file <<
"Fluid Model: Peng-Robinson "<<
"\n";
6884 Breakdown_file <<
"Specific gas constant: " << config[val_iZone]->GetGas_Constant() <<
" N.m/kg.K." <<
"\n";
6885 Breakdown_file <<
"Specific gas constant(non-dim): " << config[val_iZone]->GetGas_ConstantND()<<
"\n";
6886 Breakdown_file <<
"Specific Heat Ratio: "<< config[val_iZone]->GetGamma() <<
"\n";
6887 Breakdown_file <<
"Critical Pressure: " << config[val_iZone]->GetPressure_Critical() <<
" Pa." <<
"\n";
6888 Breakdown_file <<
"Critical Temperature: " << config[val_iZone]->GetTemperature_Critical() <<
" K." <<
"\n";
6889 Breakdown_file <<
"Critical Pressure (non-dim): " << config[val_iZone]->GetPressure_Critical() /config[val_iZone]->GetPressure_Ref() <<
"\n";
6890 Breakdown_file <<
"Critical Temperature (non-dim) : " << config[val_iZone]->GetTemperature_Critical() /config[val_iZone]->GetTemperature_Ref() <<
"\n";
6896 switch (config[val_iZone]->GetKind_ViscosityModel()) {
6899 Breakdown_file <<
"Viscosity Model: CONSTANT_VISCOSITY "<<
"\n";
6900 Breakdown_file <<
"Laminar Viscosity: " << config[val_iZone]->GetMu_Constant();
6901 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
6902 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
6903 Breakdown_file <<
"Laminar Viscosity (non-dim): " << config[val_iZone]->GetMu_ConstantND()<<
"\n";
6907 Breakdown_file <<
"Viscosity Model: SUTHERLAND "<<
"\n";
6908 Breakdown_file <<
"Ref. Laminar Viscosity: " << config[val_iZone]->GetMu_Ref();
6909 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
6910 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
6911 Breakdown_file <<
"Ref. Temperature: " << config[val_iZone]->GetMu_Temperature_Ref();
6912 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
6913 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
6914 Breakdown_file <<
"Sutherland Constant: "<< config[val_iZone]->GetMu_S();
6915 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
6916 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
6917 Breakdown_file <<
"Laminar Viscosity (non-dim): " << config[val_iZone]->GetMu_ConstantND()<<
"\n";
6918 Breakdown_file <<
"Ref. Temperature (non-dim): " << config[val_iZone]->GetMu_Temperature_RefND()<<
"\n";
6919 Breakdown_file <<
"Sutherland constant (non-dim): "<< config[val_iZone]->GetMu_SND()<<
"\n";
6923 switch (config[val_iZone]->GetKind_ConductivityModel()) {
6926 Breakdown_file <<
"Conductivity Model: CONSTANT_PRANDTL "<<
"\n";
6927 Breakdown_file <<
"Prandtl: " << config[val_iZone]->GetPrandtl_Lam()<<
"\n";
6931 Breakdown_file <<
"Conductivity Model: CONSTANT_CONDUCTIVITY "<<
"\n";
6932 Breakdown_file <<
"Molecular Conductivity: " << config[val_iZone]->GetKt_Constant()<<
" W/m^2.K." <<
"\n";
6933 Breakdown_file <<
"Molecular Conductivity (non-dim): " << config[val_iZone]->GetKt_ConstantND()<<
"\n";
6939 switch (config[val_iZone]->GetKind_ConductivityModel_Turb()) {
6941 Breakdown_file <<
"Turbulent Conductivity Model: CONSTANT_PRANDTL_TURB "<<
"\n";
6942 Breakdown_file <<
"Turbulent Prandtl: " << config[val_iZone]->GetPrandtl_Turb()<<
"\n";
6945 Breakdown_file <<
"Turbulent Conductivity Model: NO_CONDUCTIVITY_TURB "<<
"\n";
6946 Breakdown_file <<
"No turbulent component in effective thermal conductivity." <<
"\n";
6954 if (incompressible) {
6955 Breakdown_file <<
"Bulk modulus: " << config[val_iZone]->GetBulk_Modulus();
6956 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
6957 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
6958 Breakdown_file <<
"Epsilon^2 multiplier of Beta for incompressible preconditioner: " << config[val_iZone]->GetBeta_Factor();
6959 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
6960 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
6963 Breakdown_file <<
"Free-stream static pressure: " << config[val_iZone]->GetPressure_FreeStream();
6964 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
6965 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
6967 Breakdown_file <<
"Free-stream total pressure: " << config[val_iZone]->GetPressure_FreeStream() * pow( 1.0+config[val_iZone]->GetMach()*config[val_iZone]->GetMach()*0.5*(config[val_iZone]->GetGamma()-1.0), config[val_iZone]->GetGamma()/(config[val_iZone]->GetGamma()-1.0) );
6968 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
6969 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
6972 Breakdown_file <<
"Free-stream temperature: " << config[val_iZone]->GetTemperature_FreeStream();
6973 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
6974 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
6976 Breakdown_file <<
"Free-stream total temperature: " << config[val_iZone]->GetTemperature_FreeStream() * (1.0 + config[val_iZone]->GetMach() * config[val_iZone]->GetMach() * 0.5 * (config[val_iZone]->GetGamma() - 1.0));
6977 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
6978 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
6981 Breakdown_file <<
"Free-stream density: " << config[val_iZone]->GetDensity_FreeStream();
6982 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" kg/m^3." <<
"\n";
6983 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" slug/ft^3." <<
"\n";
6986 Breakdown_file <<
"Free-stream velocity: (" << config[val_iZone]->GetVelocity_FreeStream()[0] <<
", ";
6987 Breakdown_file << config[val_iZone]->GetVelocity_FreeStream()[1] <<
")";
6990 Breakdown_file <<
"Free-stream velocity: (" << config[val_iZone]->GetVelocity_FreeStream()[0] <<
", ";
6991 Breakdown_file << config[val_iZone]->GetVelocity_FreeStream()[1] <<
", " << config[val_iZone]->GetVelocity_FreeStream()[2] <<
")";
6993 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s. ";
6994 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s. ";
6996 Breakdown_file <<
"Magnitude: " << config[val_iZone]->GetModVel_FreeStream();
6997 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s." <<
"\n";
6998 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s." <<
"\n";
7001 Breakdown_file <<
"Free-stream total energy per unit mass: " << config[val_iZone]->GetEnergy_FreeStream();
7002 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m^2/s^2." <<
"\n";
7003 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft^2/s^2." <<
"\n";
7007 Breakdown_file <<
"Free-stream viscosity: " << config[val_iZone]->GetViscosity_FreeStream();
7008 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7009 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7011 Breakdown_file <<
"Free-stream turb. kinetic energy per unit mass: " << config[val_iZone]->GetTke_FreeStream();
7012 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m^2/s^2." <<
"\n";
7013 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft^2/s^2." <<
"\n";
7014 Breakdown_file <<
"Free-stream specific dissipation: " << config[val_iZone]->GetOmega_FreeStream();
7015 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" 1/s." <<
"\n";
7016 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" 1/s." <<
"\n";
7020 if (unsteady) { Breakdown_file <<
"Total time: " << config[val_iZone]->GetTotal_UnstTime() <<
" s. Time step: " << config[val_iZone]->GetDelta_UnstTime() <<
" s." <<
"\n"; }
7024 Breakdown_file <<
"-- Reference values:"<<
"\n";
7027 Breakdown_file <<
"Reference specific gas constant: " << config[val_iZone]->GetGas_Constant_Ref();
7028 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.m/kg.K." <<
"\n";
7029 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.ft/slug.R." <<
"\n";
7032 Breakdown_file <<
"Reference pressure: " << config[val_iZone]->GetPressure_Ref();
7033 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7034 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7037 Breakdown_file <<
"Reference temperature: " << config[val_iZone]->GetTemperature_Ref();
7038 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7039 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7042 Breakdown_file <<
"Reference density: " << config[val_iZone]->GetDensity_Ref();
7043 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" kg/m^3." <<
"\n";
7044 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" slug/ft^3." <<
"\n";
7046 Breakdown_file <<
"Reference velocity: " << config[val_iZone]->GetVelocity_Ref();
7047 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s." <<
"\n";
7048 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s." <<
"\n";
7051 Breakdown_file <<
"Reference energy per unit mass: " << config[val_iZone]->GetEnergy_Ref();
7052 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m^2/s^2." <<
"\n";
7053 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft^2/s^2." <<
"\n";
7056 if (incompressible) {
7057 Breakdown_file <<
"Reference length: " << config[val_iZone]->GetLength_Ref();
7058 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m." <<
"\n";
7059 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" in." <<
"\n";
7063 Breakdown_file <<
"Reference viscosity: " << config[val_iZone]->GetViscosity_Ref();
7064 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7065 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7067 Breakdown_file <<
"Reference conductivity: " << config[val_iZone]->GetConductivity_Ref();
7068 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" W/m^2.K." <<
"\n";
7069 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf/ft.s.R." <<
"\n";
7074 if (unsteady) Breakdown_file <<
"Reference time: " << config[val_iZone]->GetTime_Ref() <<
" s." <<
"\n";
7078 Breakdown_file <<
"-- Resulting non-dimensional state:" <<
"\n";
7079 Breakdown_file <<
"Mach number (non-dim): " << config[val_iZone]->GetMach() <<
"\n";
7081 Breakdown_file <<
"Reynolds number (non-dim): " << config[val_iZone]->GetReynolds() <<
". Re length: " << config[val_iZone]->GetLength_Reynolds();
7082 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m." <<
"\n";
7083 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft." <<
"\n";
7086 Breakdown_file <<
"Froude number (non-dim): " << config[val_iZone]->GetFroude() <<
"\n";
7087 Breakdown_file <<
"Lenght of the baseline wave (non-dim): " << 2.0*
PI_NUMBER*config[val_iZone]->GetFroude()*config[val_iZone]->GetFroude() <<
"\n";
7091 Breakdown_file <<
"Specific gas constant (non-dim): " << config[val_iZone]->GetGas_ConstantND() <<
"\n";
7092 Breakdown_file <<
"Free-stream temperature (non-dim): " << config[val_iZone]->GetTemperature_FreeStreamND() <<
"\n";
7095 Breakdown_file <<
"Free-stream pressure (non-dim): " << config[val_iZone]->GetPressure_FreeStreamND() <<
"\n";
7097 Breakdown_file <<
"Free-stream density (non-dim): " << config[val_iZone]->GetDensity_FreeStreamND() <<
"\n";
7100 Breakdown_file <<
"Free-stream velocity (non-dim): (" << config[val_iZone]->GetVelocity_FreeStreamND()[0] <<
", ";
7101 Breakdown_file << config[val_iZone]->GetVelocity_FreeStreamND()[1] <<
"). ";
7103 Breakdown_file <<
"Free-stream velocity (non-dim): (" << config[val_iZone]->GetVelocity_FreeStreamND()[0] <<
", ";
7104 Breakdown_file << config[val_iZone]->GetVelocity_FreeStreamND()[1] <<
", " << config[val_iZone]->GetVelocity_FreeStreamND()[2] <<
"). ";
7106 Breakdown_file <<
"Magnitude: " << config[val_iZone]->GetModVel_FreeStreamND() <<
"\n";
7109 Breakdown_file <<
"Free-stream total energy per unit mass (non-dim): " << config[val_iZone]->GetEnergy_FreeStreamND() <<
"\n";
7112 Breakdown_file <<
"Free-stream viscosity (non-dim): " << config[val_iZone]->GetViscosity_FreeStreamND() <<
"\n";
7114 Breakdown_file <<
"Free-stream turb. kinetic energy (non-dim): " << config[val_iZone]->GetTke_FreeStreamND() <<
"\n";
7115 Breakdown_file <<
"Free-stream specific dissipation (non-dim): " << config[val_iZone]->GetOmega_FreeStreamND() <<
"\n";
7120 Breakdown_file <<
"Total time (non-dim): " << config[val_iZone]->GetTotal_UnstTimeND() <<
"\n";
7121 Breakdown_file <<
"Time step (non-dim): " << config[val_iZone]->GetDelta_UnstTimeND() <<
"\n";
7128 bool energy = config[val_iZone]->GetEnergy_Equation();
7129 bool boussinesq = (config[val_iZone]->GetKind_DensityModel() ==
BOUSSINESQ);
7131 if (config[val_iZone]->GetRef_Inc_NonDim() ==
DIMENSIONAL) {
7132 Breakdown_file <<
"Viscous and Inviscid flow: rho_ref, vel_ref, temp_ref, p_ref" <<
"\n";
7133 Breakdown_file <<
"are set to 1.0 in order to perform a dimensional calculation." <<
"\n";
7134 if (dynamic_grid) Breakdown_file <<
"Force coefficients computed using MACH_MOTION." <<
"\n";
7135 else Breakdown_file <<
"Force coefficients computed using initial values." <<
"\n";
7137 else if (config[val_iZone]->GetRef_Inc_NonDim() ==
INITIAL_VALUES) {
7138 Breakdown_file <<
"Viscous and Inviscid flow: rho_ref, vel_ref, and temp_ref" <<
"\n";
7139 Breakdown_file <<
"are based on the initial values, p_ref = rho_ref*vel_ref^2." <<
"\n";
7140 if (dynamic_grid) Breakdown_file <<
"Force coefficients computed using MACH_MOTION." <<
"\n";
7141 else Breakdown_file <<
"Force coefficients computed using initial values." <<
"\n";
7144 Breakdown_file <<
"Viscous and Inviscid flow: rho_ref, vel_ref, and temp_ref" <<
"\n";
7145 Breakdown_file <<
"are user-provided reference values, p_ref = rho_ref*vel_ref^2." <<
"\n";
7146 if (dynamic_grid) Breakdown_file <<
"Force coefficients computed using MACH_MOTION." <<
"\n";
7147 else Breakdown_file <<
"Force coefficients computed using reference values." <<
"\n";
7149 Breakdown_file <<
"The reference area for force coeffs. is " << config[val_iZone]->GetRefArea() <<
" m^2." <<
"\n";
7150 Breakdown_file <<
"The reference length for force coeffs. is " << config[val_iZone]->GetRefLength() <<
" m." <<
"\n";
7152 Breakdown_file <<
"The pressure is decomposed into thermodynamic and dynamic components." <<
"\n";
7153 Breakdown_file <<
"The initial value of the dynamic pressure is 0." <<
"\n";
7155 Breakdown_file <<
"Mach number: "<< config[val_iZone]->GetMach();
7157 Breakdown_file <<
", computed using the Bulk modulus." <<
"\n";
7159 Breakdown_file <<
", computed using fluid speed of sound." <<
"\n";
7162 Breakdown_file <<
"For external flows, the initial state is imposed at the far-field." <<
"\n";
7163 Breakdown_file <<
"Angle of attack (deg): "<< config[val_iZone]->GetAoA() <<
", computed using the initial velocity." <<
"\n";
7164 Breakdown_file <<
"Side slip angle (deg): "<< config[val_iZone]->GetAoS() <<
", computed using the initial velocity." <<
"\n";
7167 Breakdown_file <<
"Reynolds number per meter: " << config[val_iZone]->GetReynolds() <<
", computed using initial values."<<
"\n";
7168 Breakdown_file <<
"Reynolds number is a byproduct of inputs only (not used internally)." <<
"\n";
7170 Breakdown_file <<
"SI units only. The grid should be dimensional (meters)." <<
"\n";
7172 switch (config[val_iZone]->GetKind_DensityModel()) {
7175 if (energy) Breakdown_file <<
"Energy equation is active and decoupled." <<
"\n";
7176 else Breakdown_file <<
"No energy equation." <<
"\n";
7180 if (energy) Breakdown_file <<
"Energy equation is active and coupled through Boussinesq approx." <<
"\n";
7184 if (energy) Breakdown_file <<
"Energy equation is active and coupled for variable density." <<
"\n";
7189 Breakdown_file <<
"-- Input conditions:"<<
"\n";
7191 switch (config[val_iZone]->GetKind_FluidModel()) {
7194 Breakdown_file <<
"Fluid Model: CONSTANT_DENSITY "<<
"\n";
7196 Breakdown_file <<
"Specific heat at constant pressure (Cp): " << config[val_iZone]->GetSpecific_Heat_Cp() <<
" N.m/kg.K." <<
"\n";
7198 if (boussinesq) Breakdown_file <<
"Thermal expansion coefficient: " << config[val_iZone]->GetThermal_Expansion_Coeff() <<
" K^-1." <<
"\n";
7199 Breakdown_file <<
"Thermodynamic pressure not required." <<
"\n";
7203 Breakdown_file <<
"Fluid Model: INC_IDEAL_GAS "<< endl;
7204 Breakdown_file <<
"Variable density incompressible flow using ideal gas law." << endl;
7205 Breakdown_file <<
"Density is a function of temperature (constant thermodynamic pressure)." << endl;
7206 Breakdown_file <<
"Specific heat at constant pressure (Cp): " << config[val_iZone]->GetSpecific_Heat_Cp() <<
" N.m/kg.K." << endl;
7207 Breakdown_file <<
"Molecular weight : "<< config[val_iZone]->GetMolecular_Weight() <<
" g/mol" << endl;
7208 Breakdown_file <<
"Specific gas constant: " << config[val_iZone]->GetGas_Constant() <<
" N.m/kg.K." << endl;
7209 Breakdown_file <<
"Thermodynamic pressure: " << config[val_iZone]->GetPressure_Thermodynamic();
7210 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." << endl;
7211 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." << endl;
7215 Breakdown_file <<
"Fluid Model: INC_IDEAL_GAS_POLY "<< endl;
7216 Breakdown_file <<
"Variable density incompressible flow using ideal gas law." << endl;
7217 Breakdown_file <<
"Density is a function of temperature (constant thermodynamic pressure)." << endl;
7218 Breakdown_file <<
"Molecular weight: " << config[val_iZone]->GetMolecular_Weight() <<
" g/mol." << endl;
7219 Breakdown_file <<
"Specific gas constant: " << config[val_iZone]->GetGas_Constant() <<
" N.m/kg.K." << endl;
7220 Breakdown_file <<
"Specific gas constant (non-dim): " << config[val_iZone]->GetGas_ConstantND() << endl;
7221 Breakdown_file <<
"Thermodynamic pressure: " << config[val_iZone]->GetPressure_Thermodynamic();
7222 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." << endl;
7223 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." << endl;
7224 Breakdown_file <<
"Cp(T) polynomial coefficients: \n (";
7225 for (
unsigned short iVar = 0; iVar < config[val_iZone]->GetnPolyCoeffs(); iVar++) {
7226 Breakdown_file << config[val_iZone]->GetCp_PolyCoeff(iVar);
7227 if (iVar < config[val_iZone]->GetnPolyCoeffs()-1) Breakdown_file <<
", ";
7229 Breakdown_file <<
")." << endl;
7230 Breakdown_file <<
"Cp(T) polynomial coefficients (non-dim.): \n (";
7231 for (
unsigned short iVar = 0; iVar < config[val_iZone]->GetnPolyCoeffs(); iVar++) {
7232 Breakdown_file << config[val_iZone]->GetCp_PolyCoeffND(iVar);
7233 if (iVar < config[val_iZone]->GetnPolyCoeffs()-1) Breakdown_file <<
", ";
7235 Breakdown_file <<
")." << endl;
7240 switch (config[val_iZone]->GetKind_ViscosityModel()) {
7243 Breakdown_file <<
"Viscosity Model: CONSTANT_VISCOSITY "<<
"\n";
7244 Breakdown_file <<
"Constant Laminar Viscosity: " << config[val_iZone]->GetMu_Constant();
7245 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7246 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7247 Breakdown_file <<
"Laminar Viscosity (non-dim): " << config[val_iZone]->GetMu_ConstantND()<<
"\n";
7251 Breakdown_file <<
"Viscosity Model: SUTHERLAND "<<
"\n";
7252 Breakdown_file <<
"Ref. Laminar Viscosity: " << config[val_iZone]->GetMu_Ref();
7253 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7254 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7255 Breakdown_file <<
"Ref. Temperature: " << config[val_iZone]->GetMu_Temperature_Ref();
7256 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7257 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7258 Breakdown_file <<
"Sutherland Constant: "<< config[val_iZone]->GetMu_S();
7259 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7260 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7261 Breakdown_file <<
"Laminar Viscosity (non-dim): " << config[val_iZone]->GetMu_ConstantND()<<
"\n";
7262 Breakdown_file <<
"Ref. Temperature (non-dim): " << config[val_iZone]->GetMu_Temperature_RefND()<<
"\n";
7263 Breakdown_file <<
"Sutherland constant (non-dim): "<< config[val_iZone]->GetMu_SND()<<
"\n";
7267 Breakdown_file <<
"Viscosity Model: POLYNOMIAL_VISCOSITY "<< endl;
7268 Breakdown_file <<
"Mu(T) polynomial coefficients: \n (";
7269 for (
unsigned short iVar = 0; iVar < config[val_iZone]->GetnPolyCoeffs(); iVar++) {
7270 Breakdown_file << config[val_iZone]->GetMu_PolyCoeff(iVar);
7271 if (iVar < config[val_iZone]->GetnPolyCoeffs()-1) Breakdown_file <<
", ";
7273 Breakdown_file <<
")." << endl;
7274 Breakdown_file <<
"Mu(T) polynomial coefficients (non-dim.): \n (";
7275 for (
unsigned short iVar = 0; iVar < config[val_iZone]->GetnPolyCoeffs(); iVar++) {
7276 Breakdown_file << config[val_iZone]->GetMu_PolyCoeffND(iVar);
7277 if (iVar < config[val_iZone]->GetnPolyCoeffs()-1) Breakdown_file <<
", ";
7279 Breakdown_file <<
")." << endl;
7285 switch (config[val_iZone]->GetKind_ConductivityModel()) {
7288 Breakdown_file <<
"Conductivity Model: CONSTANT_PRANDTL "<<
"\n";
7289 Breakdown_file <<
"Prandtl (Laminar): " << config[val_iZone]->GetPrandtl_Lam()<<
"\n";
7293 Breakdown_file <<
"Conductivity Model: CONSTANT_CONDUCTIVITY "<<
"\n";
7294 Breakdown_file <<
"Molecular Conductivity: " << config[val_iZone]->GetKt_Constant()<<
" W/m^2.K." <<
"\n";
7295 Breakdown_file <<
"Molecular Conductivity (non-dim): " << config[val_iZone]->GetKt_ConstantND()<<
"\n";
7299 Breakdown_file <<
"Viscosity Model: POLYNOMIAL_CONDUCTIVITY "<< endl;
7300 Breakdown_file <<
"Kt(T) polynomial coefficients: \n (";
7301 for (
unsigned short iVar = 0; iVar < config[val_iZone]->GetnPolyCoeffs(); iVar++) {
7302 Breakdown_file << config[val_iZone]->GetKt_PolyCoeff(iVar);
7303 if (iVar < config[val_iZone]->GetnPolyCoeffs()-1) Breakdown_file <<
", ";
7305 Breakdown_file <<
")." << endl;
7306 Breakdown_file <<
"Kt(T) polynomial coefficients (non-dim.): \n (";
7307 for (
unsigned short iVar = 0; iVar < config[val_iZone]->GetnPolyCoeffs(); iVar++) {
7308 Breakdown_file << config[val_iZone]->GetKt_PolyCoeffND(iVar);
7309 if (iVar < config[val_iZone]->GetnPolyCoeffs()-1) Breakdown_file <<
", ";
7311 Breakdown_file <<
")." << endl;
7317 switch (config[val_iZone]->GetKind_ConductivityModel_Turb()) {
7319 Breakdown_file <<
"Turbulent Conductivity Model: CONSTANT_PRANDTL_TURB "<<
"\n";
7320 Breakdown_file <<
"Turbulent Prandtl: " << config[val_iZone]->GetPrandtl_Turb()<<
"\n";
7323 Breakdown_file <<
"Turbulent Conductivity Model: NO_CONDUCTIVITY_TURB "<<
"\n";
7324 Breakdown_file <<
"No turbulent component in effective thermal conductivity." <<
"\n";
7334 Breakdown_file <<
"Bulk modulus: " << config[val_iZone]->GetBulk_Modulus();
7335 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7336 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7339 Breakdown_file <<
"Initial dynamic pressure: " << config[val_iZone]->GetPressure_FreeStream();
7340 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7341 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7343 Breakdown_file <<
"Initial total pressure: " << config[val_iZone]->GetPressure_FreeStream() + 0.5*config[val_iZone]->GetDensity_FreeStream()*config[val_iZone]->GetModVel_FreeStream()*config[val_iZone]->GetModVel_FreeStream();
7344 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7345 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7348 Breakdown_file <<
"Initial temperature: " << config[val_iZone]->GetTemperature_FreeStream();
7349 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7350 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7353 Breakdown_file <<
"Initial density: " << config[val_iZone]->GetDensity_FreeStream();
7354 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" kg/m^3." <<
"\n";
7355 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" slug/ft^3." <<
"\n";
7358 Breakdown_file <<
"Initial velocity: (" << config[val_iZone]->GetVelocity_FreeStream()[0] <<
", ";
7359 Breakdown_file << config[val_iZone]->GetVelocity_FreeStream()[1] <<
")";
7362 Breakdown_file <<
"Initial velocity: (" << config[val_iZone]->GetVelocity_FreeStream()[0] <<
", ";
7363 Breakdown_file << config[val_iZone]->GetVelocity_FreeStream()[1] <<
", " << config[val_iZone]->GetVelocity_FreeStream()[2] <<
")";
7365 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s. ";
7366 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s. ";
7368 Breakdown_file <<
"Magnitude: " << config[val_iZone]->GetModVel_FreeStream();
7369 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s." <<
"\n";
7370 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s." <<
"\n";
7373 Breakdown_file <<
"Initial laminar viscosity: " << config[val_iZone]->GetViscosity_FreeStream();
7374 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7375 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7377 Breakdown_file <<
"Initial turb. kinetic energy per unit mass: " << config[val_iZone]->GetTke_FreeStream();
7378 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m^2/s^2." <<
"\n";
7379 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft^2/s^2." <<
"\n";
7380 Breakdown_file <<
"Initial specific dissipation: " << config[val_iZone]->GetOmega_FreeStream();
7381 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" 1/s." <<
"\n";
7382 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" 1/s." <<
"\n";
7386 if (unsteady) { Breakdown_file <<
"Total time: " << config[val_iZone]->GetTotal_UnstTime() <<
" s. Time step: " << config[val_iZone]->GetDelta_UnstTime() <<
" s." <<
"\n"; }
7390 Breakdown_file <<
"-- Reference values:"<<
"\n";
7393 Breakdown_file <<
"Reference specific gas constant: " << config[val_iZone]->GetGas_Constant_Ref();
7394 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.m/kg.K." <<
"\n";
7395 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.ft/slug.R." <<
"\n";
7398 Breakdown_file <<
"Reference specific heat: " << config[val_iZone]->GetGas_Constant_Ref();
7399 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.m/kg.K." <<
"\n";
7400 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.ft/slug.R." <<
"\n";
7404 Breakdown_file <<
"Reference pressure: " << config[val_iZone]->GetPressure_Ref();
7405 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7406 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7409 Breakdown_file <<
"Reference temperature: " << config[val_iZone]->GetTemperature_Ref();
7410 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7411 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7414 Breakdown_file <<
"Reference density: " << config[val_iZone]->GetDensity_Ref();
7415 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" kg/m^3." <<
"\n";
7416 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" slug/ft^3." <<
"\n";
7418 Breakdown_file <<
"Reference velocity: " << config[val_iZone]->GetVelocity_Ref();
7419 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s." <<
"\n";
7420 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s." <<
"\n";
7422 Breakdown_file <<
"Reference length: " << config[val_iZone]->GetLength_Ref();
7423 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m." <<
"\n";
7424 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" in." <<
"\n";
7427 Breakdown_file <<
"Reference viscosity: " << config[val_iZone]->GetViscosity_Ref();
7428 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7429 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7432 if (unsteady) Breakdown_file <<
"Reference time: " << config[val_iZone]->GetTime_Ref() <<
" s." <<
"\n";
7436 Breakdown_file <<
"-- Resulting non-dimensional state:" <<
"\n";
7437 Breakdown_file <<
"Mach number (non-dim): " << config[val_iZone]->GetMach() <<
"\n";
7439 Breakdown_file <<
"Reynolds number (per m): " << config[val_iZone]->GetReynolds() <<
"\n";
7443 Breakdown_file <<
"Specific gas constant (non-dim): " << config[val_iZone]->GetGas_ConstantND() <<
"\n";
7444 Breakdown_file <<
"Initial thermodynamic pressure (non-dim): " << config[val_iZone]->GetPressure_ThermodynamicND() <<
"\n";
7447 Breakdown_file <<
"Specific heat at constant pressure (non-dim): " << config[val_iZone]->GetSpecific_Heat_CpND() <<
"\n";
7448 if (boussinesq) Breakdown_file <<
"Thermal expansion coefficient (non-dim.): " << config[val_iZone]->GetThermal_Expansion_CoeffND() <<
" K^-1." <<
"\n";
7452 if (energy) Breakdown_file <<
"Initial temperature (non-dim): " << config[val_iZone]->GetTemperature_FreeStreamND() <<
"\n";
7453 Breakdown_file <<
"Initial pressure (non-dim): " << config[val_iZone]->GetPressure_FreeStreamND() <<
"\n";
7454 Breakdown_file <<
"Initial density (non-dim): " << config[val_iZone]->GetDensity_FreeStreamND() <<
"\n";
7457 Breakdown_file <<
"Initial velocity (non-dim): (" << config[val_iZone]->GetVelocity_FreeStreamND()[0] <<
", ";
7458 Breakdown_file << config[val_iZone]->GetVelocity_FreeStreamND()[1] <<
"). ";
7460 Breakdown_file <<
"Initial velocity (non-dim): (" << config[val_iZone]->GetVelocity_FreeStreamND()[0] <<
", ";
7461 Breakdown_file << config[val_iZone]->GetVelocity_FreeStreamND()[1] <<
", " << config[val_iZone]->GetVelocity_FreeStreamND()[2] <<
"). ";
7463 Breakdown_file <<
"Magnitude: " << config[val_iZone]->GetModVel_FreeStreamND() <<
"\n";
7466 Breakdown_file <<
"Initial viscosity (non-dim): " << config[val_iZone]->GetViscosity_FreeStreamND() <<
"\n";
7468 Breakdown_file <<
"Initial turb. kinetic energy (non-dim): " << config[val_iZone]->GetTke_FreeStreamND() <<
"\n";
7469 Breakdown_file <<
"Initial specific dissipation (non-dim): " << config[val_iZone]->GetOmega_FreeStreamND() <<
"\n";
7474 Breakdown_file <<
"Total time (non-dim): " << config[val_iZone]->GetTotal_UnstTimeND() <<
"\n";
7475 Breakdown_file <<
"Time step (non-dim): " << config[val_iZone]->GetDelta_UnstTimeND() <<
"\n";
7482 Breakdown_file << fixed;
7483 Breakdown_file <<
"\n" <<
"\n" <<
"Forces breakdown:" <<
"\n" <<
"\n";
7487 su2double term = (Total_CoPz/m)-Total_CoPx;
7489 if (term > 0) Breakdown_file <<
"Center of Pressure: X=" << 1/m <<
"Z-"<< term <<
"." <<
"\n\n";
7490 else Breakdown_file <<
"Center of Pressure: X=" << 1/m <<
"Z+"<< fabs(term);
7491 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m." <<
"\n\n";
7492 else Breakdown_file <<
" in." <<
"\n\n";
7496 su2double term = (Total_CoPy/m)-Total_CoPx;
7497 if (term > 0) Breakdown_file <<
"Center of Pressure: X=" << 1/m <<
"Y-"<< term <<
"." <<
"\n\n";
7498 else Breakdown_file <<
"Center of Pressure: X=" << 1/m <<
"Y+"<< fabs(term);
7499 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m." <<
"\n\n";
7500 else Breakdown_file <<
" in." <<
"\n\n";
7505 su2double RefDensity, RefArea, RefVel, Factor, Ref;
7506 RefArea = config[val_iZone]->GetRefArea();
7511 if ((config[val_iZone]->GetRef_Inc_NonDim() ==
DIMENSIONAL) ||
7515 for (iDim = 0; iDim < nDim; iDim++)
7517 RefVel = sqrt(RefVel);
7519 RefDensity = config[val_iZone]->GetInc_Density_Ref();
7520 RefVel = config[val_iZone]->GetInc_Velocity_Ref();
7523 Factor = (0.5*RefDensity*RefArea*RefVel*RefVel);
7524 Ref = config[val_iZone]->GetDensity_Ref() * config[val_iZone]->GetVelocity_Ref() * config[val_iZone]->GetVelocity_Ref() * 1.0 * 1.0;
7526 Breakdown_file <<
"NOTE: Multiply forces by the non-dimensional factor: " << Factor <<
", and the reference factor: " << Ref <<
"\n";
7527 Breakdown_file <<
"to obtain the dimensional force." <<
"\n" <<
"\n";
7529 Breakdown_file <<
"Total CL: ";
7530 Breakdown_file.width(11);
7531 Breakdown_file << Total_CL;
7532 Breakdown_file <<
" | Pressure (";
7533 Breakdown_file.width(5);
7535 Breakdown_file <<
"%): ";
7536 Breakdown_file.width(11);
7537 Breakdown_file << Inv_CL;
7538 Breakdown_file <<
" | Friction (";
7539 Breakdown_file.width(5);
7541 Breakdown_file <<
"%): ";
7542 Breakdown_file.width(11);
7543 Breakdown_file << Visc_CL;
7544 Breakdown_file <<
" | Momentum (";
7545 Breakdown_file.width(5);
7547 Breakdown_file <<
"%): ";
7548 Breakdown_file.width(11);
7549 Breakdown_file << Mnt_CL <<
"\n";
7551 Breakdown_file <<
"Total CD: ";
7552 Breakdown_file.width(11);
7553 Breakdown_file << Total_CD;
7554 Breakdown_file <<
" | Pressure (";
7555 Breakdown_file.width(5);
7556 Breakdown_file <<
SU2_TYPE::Int((Inv_CD * 100.0) / (Total_CD +
EPS)) <<
"%): ";
7557 Breakdown_file.width(11);
7558 Breakdown_file << Inv_CD;
7559 Breakdown_file <<
" | Friction (";
7560 Breakdown_file.width(5);
7561 Breakdown_file <<
SU2_TYPE::Int((Visc_CD * 100.0) / (Total_CD +
EPS)) <<
"%): ";
7562 Breakdown_file.width(11);
7563 Breakdown_file << Visc_CD;
7564 Breakdown_file <<
" | Momentum (";
7565 Breakdown_file.width(5);
7566 Breakdown_file <<
SU2_TYPE::Int((Mnt_CD * 100.0) / (Total_CD +
EPS)) <<
"%): ";
7567 Breakdown_file.width(11);
7568 Breakdown_file << Mnt_CD <<
"\n";
7571 Breakdown_file <<
"Total CSF: ";
7572 Breakdown_file.width(11);
7573 Breakdown_file << Total_CSF;
7574 Breakdown_file <<
" | Pressure (";
7575 Breakdown_file.width(5);
7577 Breakdown_file <<
"%): ";
7578 Breakdown_file.width(11);
7579 Breakdown_file << Inv_CSF;
7580 Breakdown_file <<
" | Friction (";
7581 Breakdown_file.width(5);
7583 Breakdown_file <<
"%): ";
7584 Breakdown_file.width(11);
7585 Breakdown_file << Visc_CSF;
7586 Breakdown_file <<
" | Momentum (";
7587 Breakdown_file.width(5);
7589 Breakdown_file <<
"%): ";
7590 Breakdown_file.width(11);
7591 Breakdown_file << Mnt_CSF <<
"\n";
7594 Breakdown_file <<
"Total CL/CD: ";
7595 Breakdown_file.width(11);
7596 Breakdown_file << Total_CEff;
7597 Breakdown_file <<
" | Pressure (";
7598 Breakdown_file.width(5);
7600 Breakdown_file <<
"%): ";
7601 Breakdown_file.width(11);
7602 Breakdown_file << Inv_CEff;
7603 Breakdown_file <<
" | Friction (";
7604 Breakdown_file.width(5);
7606 Breakdown_file <<
"%): ";
7607 Breakdown_file.width(11);
7608 Breakdown_file << Visc_CEff;
7609 Breakdown_file <<
" | Momentum (";
7610 Breakdown_file.width(5);
7612 Breakdown_file <<
"%): ";
7613 Breakdown_file.width(11);
7614 Breakdown_file << Mnt_CEff <<
"\n";
7617 Breakdown_file <<
"Total CMx: ";
7618 Breakdown_file.width(11);
7619 Breakdown_file << Total_CMx;
7620 Breakdown_file <<
" | Pressure (";
7621 Breakdown_file.width(5);
7623 Breakdown_file <<
"%): ";
7624 Breakdown_file.width(11);
7625 Breakdown_file << Inv_CMx;
7626 Breakdown_file <<
" | Friction (";
7627 Breakdown_file.width(5);
7629 Breakdown_file <<
"%): ";
7630 Breakdown_file.width(11);
7631 Breakdown_file << Visc_CMx;
7632 Breakdown_file <<
" | Momentum (";
7633 Breakdown_file.width(5);
7635 Breakdown_file <<
"%): ";
7636 Breakdown_file.width(11);
7637 Breakdown_file << Mnt_CMx <<
"\n";
7639 Breakdown_file <<
"Total CMy: ";
7640 Breakdown_file.width(11);
7641 Breakdown_file << Total_CMy;
7642 Breakdown_file <<
" | Pressure (";
7643 Breakdown_file.width(5);
7645 Breakdown_file <<
"%): ";
7646 Breakdown_file.width(11);
7647 Breakdown_file << Inv_CMy;
7648 Breakdown_file <<
" | Friction (";
7649 Breakdown_file.width(5);
7651 Breakdown_file <<
"%): ";
7652 Breakdown_file.width(11);
7653 Breakdown_file << Visc_CMy;
7654 Breakdown_file <<
" | Momentum (";
7655 Breakdown_file.width(5);
7657 Breakdown_file <<
"%): ";
7658 Breakdown_file.width(11);
7659 Breakdown_file << Mnt_CMy <<
"\n";
7662 Breakdown_file <<
"Total CMz: ";
7663 Breakdown_file.width(11);
7664 Breakdown_file << Total_CMz;
7665 Breakdown_file <<
" | Pressure (";
7666 Breakdown_file.width(5);
7668 Breakdown_file <<
"%): ";
7669 Breakdown_file.width(11);
7670 Breakdown_file << Inv_CMz;
7671 Breakdown_file <<
" | Friction (";
7672 Breakdown_file.width(5);
7674 Breakdown_file <<
"%): ";
7675 Breakdown_file.width(11);
7676 Breakdown_file << Visc_CMz;
7677 Breakdown_file <<
" | Momentum (";
7678 Breakdown_file.width(5);
7680 Breakdown_file <<
"%): ";
7681 Breakdown_file.width(11);
7682 Breakdown_file << Mnt_CMz <<
"\n";
7684 Breakdown_file <<
"Total CFx: ";
7685 Breakdown_file.width(11);
7686 Breakdown_file << Total_CFx;
7687 Breakdown_file <<
" | Pressure (";
7688 Breakdown_file.width(5);
7690 Breakdown_file <<
"%): ";
7691 Breakdown_file.width(11);
7692 Breakdown_file << Inv_CFx;
7693 Breakdown_file <<
" | Friction (";
7694 Breakdown_file.width(5);
7696 Breakdown_file <<
"%): ";
7697 Breakdown_file.width(11);
7698 Breakdown_file << Visc_CFx;
7699 Breakdown_file <<
" | Momentum (";
7700 Breakdown_file.width(5);
7702 Breakdown_file <<
"%): ";
7703 Breakdown_file.width(11);
7704 Breakdown_file << Mnt_CFx <<
"\n";
7706 Breakdown_file <<
"Total CFy: ";
7707 Breakdown_file.width(11);
7708 Breakdown_file << Total_CFy;
7709 Breakdown_file <<
" | Pressure (";
7710 Breakdown_file.width(5);
7712 Breakdown_file <<
"%): ";
7713 Breakdown_file.width(11);
7714 Breakdown_file << Inv_CFy;
7715 Breakdown_file <<
" | Friction (";
7716 Breakdown_file.width(5);
7718 Breakdown_file <<
"%): ";
7719 Breakdown_file.width(11);
7720 Breakdown_file << Visc_CFy;
7721 Breakdown_file <<
" | Momentum (";
7722 Breakdown_file.width(5);
7724 Breakdown_file <<
"%): ";
7725 Breakdown_file.width(11);
7726 Breakdown_file << Mnt_CFy <<
"\n";
7729 Breakdown_file <<
"Total CFz: ";
7730 Breakdown_file.width(11);
7731 Breakdown_file << Total_CFz;
7732 Breakdown_file <<
" | Pressure (";
7733 Breakdown_file.width(5);
7735 Breakdown_file <<
"%): ";
7736 Breakdown_file.width(11);
7737 Breakdown_file << Inv_CFz;
7738 Breakdown_file <<
" | Friction (";
7739 Breakdown_file.width(5);
7741 Breakdown_file <<
"%): ";
7742 Breakdown_file.width(11);
7743 Breakdown_file << Visc_CFz;
7744 Breakdown_file <<
" | Momentum (";
7745 Breakdown_file.width(5);
7747 Breakdown_file <<
"%): ";
7748 Breakdown_file.width(11);
7749 Breakdown_file << Mnt_CFz <<
"\n";
7752 Breakdown_file <<
"\n" <<
"\n";
7754 for (iMarker_Monitoring = 0;
7755 iMarker_Monitoring < config[val_iZone]->GetnMarker_Monitoring();
7756 iMarker_Monitoring++) {
7758 Breakdown_file <<
"Surface name: " 7759 << config[val_iZone]->GetMarker_Monitoring_TagBound(
7760 iMarker_Monitoring) <<
"\n" <<
"\n";
7762 Breakdown_file <<
"Total CL (";
7763 Breakdown_file.width(5);
7766 (Surface_CL[iMarker_Monitoring] * 100.0)
7767 / (Total_CL +
EPS));
7768 Breakdown_file <<
"%): ";
7769 Breakdown_file.width(11);
7770 Breakdown_file << Surface_CL[iMarker_Monitoring];
7771 Breakdown_file <<
" | Pressure (";
7772 Breakdown_file.width(5);
7775 (Surface_CL_Inv[iMarker_Monitoring] * 100.0)
7776 / (Surface_CL[iMarker_Monitoring] +
EPS));
7777 Breakdown_file <<
"%): ";
7778 Breakdown_file.width(11);
7779 Breakdown_file << Surface_CL_Inv[iMarker_Monitoring];
7780 Breakdown_file <<
" | Friction (";
7781 Breakdown_file.width(5);
7784 (Surface_CL_Visc[iMarker_Monitoring] * 100.0)
7785 / (Surface_CL[iMarker_Monitoring] +
EPS));
7786 Breakdown_file <<
"%): ";
7787 Breakdown_file.width(11);
7788 Breakdown_file << Surface_CL_Visc[iMarker_Monitoring];
7789 Breakdown_file <<
" | Momentum (";
7790 Breakdown_file.width(5);
7793 (Surface_CL_Mnt[iMarker_Monitoring] * 100.0)
7794 / (Surface_CL[iMarker_Monitoring] +
EPS));
7795 Breakdown_file <<
"%): ";
7796 Breakdown_file.width(11);
7797 Breakdown_file << Surface_CL_Mnt[iMarker_Monitoring] <<
"\n";
7799 Breakdown_file <<
"Total CD (";
7800 Breakdown_file.width(5);
7803 (Surface_CD[iMarker_Monitoring] * 100.0)
7804 / (Total_CD +
EPS));
7805 Breakdown_file <<
"%): ";
7806 Breakdown_file.width(11);
7807 Breakdown_file << Surface_CD[iMarker_Monitoring];
7808 Breakdown_file <<
" | Pressure (";
7809 Breakdown_file.width(5);
7812 (Surface_CD_Inv[iMarker_Monitoring] * 100.0)
7813 / (Surface_CD[iMarker_Monitoring] +
EPS));
7814 Breakdown_file <<
"%): ";
7815 Breakdown_file.width(11);
7816 Breakdown_file << Surface_CD_Inv[iMarker_Monitoring];
7817 Breakdown_file <<
" | Friction (";
7818 Breakdown_file.width(5);
7821 (Surface_CD_Visc[iMarker_Monitoring] * 100.0)
7822 / (Surface_CD[iMarker_Monitoring] +
EPS));
7823 Breakdown_file <<
"%): ";
7824 Breakdown_file.width(11);
7825 Breakdown_file << Surface_CD_Visc[iMarker_Monitoring];
7826 Breakdown_file <<
" | Momentum (";
7827 Breakdown_file.width(5);
7830 (Surface_CD_Mnt[iMarker_Monitoring] * 100.0)
7831 / (Surface_CD[iMarker_Monitoring] +
EPS));
7832 Breakdown_file <<
"%): ";
7833 Breakdown_file.width(11);
7834 Breakdown_file << Surface_CD_Mnt[iMarker_Monitoring] <<
"\n";
7837 Breakdown_file <<
"Total CSF (";
7838 Breakdown_file.width(5);
7841 (Surface_CSF[iMarker_Monitoring] * 100.0)
7842 / (Total_CSF +
EPS));
7843 Breakdown_file <<
"%): ";
7844 Breakdown_file.width(11);
7845 Breakdown_file << Surface_CSF[iMarker_Monitoring];
7846 Breakdown_file <<
" | Pressure (";
7847 Breakdown_file.width(5);
7850 (Surface_CSF_Inv[iMarker_Monitoring] * 100.0)
7851 / (Surface_CSF[iMarker_Monitoring] +
EPS));
7852 Breakdown_file <<
"%): ";
7853 Breakdown_file.width(11);
7854 Breakdown_file << Surface_CSF_Inv[iMarker_Monitoring];
7855 Breakdown_file <<
" | Friction (";
7856 Breakdown_file.width(5);
7859 (Surface_CSF_Visc[iMarker_Monitoring] * 100.0)
7860 / (Surface_CSF[iMarker_Monitoring] +
EPS));
7861 Breakdown_file <<
"%): ";
7862 Breakdown_file.width(11);
7864 << Surface_CSF_Visc[iMarker_Monitoring];
7865 Breakdown_file <<
" | Momentum (";
7866 Breakdown_file.width(5);
7869 (Surface_CSF_Mnt[iMarker_Monitoring] * 100.0)
7870 / (Surface_CSF[iMarker_Monitoring] +
EPS));
7871 Breakdown_file <<
"%): ";
7872 Breakdown_file.width(11);
7874 << Surface_CSF_Mnt[iMarker_Monitoring] <<
"\n";
7877 Breakdown_file <<
"Total CL/CD (";
7878 Breakdown_file.width(5);
7881 (Surface_CEff[iMarker_Monitoring] * 100.0) / (Total_CEff +
EPS));
7882 Breakdown_file <<
"%): ";
7883 Breakdown_file.width(11);
7884 Breakdown_file << Surface_CEff[iMarker_Monitoring];
7885 Breakdown_file <<
" | Pressure (";
7886 Breakdown_file.width(5);
7889 (Surface_CEff_Inv[iMarker_Monitoring] * 100.0)
7890 / (Surface_CEff[iMarker_Monitoring] +
EPS));
7891 Breakdown_file <<
"%): ";
7892 Breakdown_file.width(11);
7893 Breakdown_file << Surface_CEff_Inv[iMarker_Monitoring];
7894 Breakdown_file <<
" | Friction (";
7895 Breakdown_file.width(5);
7898 (Surface_CEff_Visc[iMarker_Monitoring] * 100.0)
7899 / (Surface_CEff[iMarker_Monitoring] +
EPS));
7900 Breakdown_file <<
"%): ";
7901 Breakdown_file.width(11);
7903 << Surface_CEff_Visc[iMarker_Monitoring];
7904 Breakdown_file <<
" | Momentum (";
7905 Breakdown_file.width(5);
7908 (Surface_CEff_Mnt[iMarker_Monitoring] * 100.0)
7909 / (Surface_CEff[iMarker_Monitoring] +
EPS));
7910 Breakdown_file <<
"%): ";
7911 Breakdown_file.width(11);
7913 << Surface_CEff_Mnt[iMarker_Monitoring] <<
"\n";
7917 Breakdown_file <<
"Total CMx (";
7918 Breakdown_file.width(5);
7921 (Surface_CMx[iMarker_Monitoring] * 100.0) / (Total_CMx +
EPS));
7922 Breakdown_file <<
"%): ";
7923 Breakdown_file.width(11);
7924 Breakdown_file << Surface_CMx[iMarker_Monitoring];
7925 Breakdown_file <<
" | Pressure (";
7926 Breakdown_file.width(5);
7929 (Surface_CMx_Inv[iMarker_Monitoring] * 100.0)
7930 / (Surface_CMx[iMarker_Monitoring] +
EPS));
7931 Breakdown_file <<
"%): ";
7932 Breakdown_file.width(11);
7933 Breakdown_file << Surface_CMx_Inv[iMarker_Monitoring];
7934 Breakdown_file <<
" | Friction (";
7935 Breakdown_file.width(5);
7938 (Surface_CMx_Visc[iMarker_Monitoring] * 100.0)
7939 / (Surface_CMx[iMarker_Monitoring] +
EPS));
7940 Breakdown_file <<
"%): ";
7941 Breakdown_file.width(11);
7943 << Surface_CMx_Visc[iMarker_Monitoring];
7944 Breakdown_file <<
" | Momentum (";
7945 Breakdown_file.width(5);
7948 (Surface_CMx_Mnt[iMarker_Monitoring] * 100.0)
7949 / (Surface_CMx[iMarker_Monitoring] +
EPS));
7950 Breakdown_file <<
"%): ";
7951 Breakdown_file.width(11);
7953 << Surface_CMx_Mnt[iMarker_Monitoring] <<
"\n";
7955 Breakdown_file <<
"Total CMy (";
7956 Breakdown_file.width(5);
7959 (Surface_CMy[iMarker_Monitoring] * 100.0) / (Total_CMy +
EPS));
7960 Breakdown_file <<
"%): ";
7961 Breakdown_file.width(11);
7962 Breakdown_file << Surface_CMy[iMarker_Monitoring];
7963 Breakdown_file <<
" | Pressure (";
7964 Breakdown_file.width(5);
7967 (Surface_CMy_Inv[iMarker_Monitoring] * 100.0)
7968 / (Surface_CMy[iMarker_Monitoring] +
EPS));
7969 Breakdown_file <<
"%): ";
7970 Breakdown_file.width(11);
7971 Breakdown_file << Surface_CMy_Inv[iMarker_Monitoring];
7972 Breakdown_file <<
" | Friction (";
7973 Breakdown_file.width(5);
7976 (Surface_CMy_Visc[iMarker_Monitoring] * 100.0)
7977 / (Surface_CMy[iMarker_Monitoring] +
EPS));
7978 Breakdown_file <<
"%): ";
7979 Breakdown_file.width(11);
7981 << Surface_CMy_Visc[iMarker_Monitoring];
7982 Breakdown_file <<
" | Momentum (";
7983 Breakdown_file.width(5);
7986 (Surface_CMy_Mnt[iMarker_Monitoring] * 100.0)
7987 / (Surface_CMy[iMarker_Monitoring] +
EPS));
7988 Breakdown_file <<
"%): ";
7989 Breakdown_file.width(11);
7991 << Surface_CMy_Mnt[iMarker_Monitoring] <<
"\n";
7994 Breakdown_file <<
"Total CMz (";
7995 Breakdown_file.width(5);
7997 <<
SU2_TYPE::Int((Surface_CMz[iMarker_Monitoring] * 100.0) / (Total_CMz +
EPS));
7998 Breakdown_file <<
"%): ";
7999 Breakdown_file.width(11);
8000 Breakdown_file << Surface_CMz[iMarker_Monitoring];
8001 Breakdown_file <<
" | Pressure (";
8002 Breakdown_file.width(5);
8005 (Surface_CMz_Inv[iMarker_Monitoring] * 100.0)
8006 / (Surface_CMz[iMarker_Monitoring] +
EPS));
8007 Breakdown_file <<
"%): ";
8008 Breakdown_file.width(11);
8009 Breakdown_file << Surface_CMz_Inv[iMarker_Monitoring];
8010 Breakdown_file <<
" | Friction (";
8011 Breakdown_file.width(5);
8014 (Surface_CMz_Visc[iMarker_Monitoring] * 100.0)
8015 / (Surface_CMz[iMarker_Monitoring] +
EPS));
8016 Breakdown_file <<
"%): ";
8017 Breakdown_file.width(11);
8019 << Surface_CMz_Visc[iMarker_Monitoring];
8020 Breakdown_file <<
" | Momentum (";
8021 Breakdown_file.width(5);
8024 (Surface_CMz_Mnt[iMarker_Monitoring] * 100.0)
8025 / (Surface_CMz[iMarker_Monitoring] +
EPS));
8026 Breakdown_file <<
"%): ";
8027 Breakdown_file.width(11);
8029 << Surface_CMz_Mnt[iMarker_Monitoring] <<
"\n";
8031 Breakdown_file <<
"Total CFx (";
8032 Breakdown_file.width(5);
8034 <<
SU2_TYPE::Int((Surface_CFx[iMarker_Monitoring] * 100.0) / (Total_CFx +
EPS));
8035 Breakdown_file <<
"%): ";
8036 Breakdown_file.width(11);
8037 Breakdown_file << Surface_CFx[iMarker_Monitoring];
8038 Breakdown_file <<
" | Pressure (";
8039 Breakdown_file.width(5);
8042 (Surface_CFx_Inv[iMarker_Monitoring] * 100.0)
8043 / (Surface_CFx[iMarker_Monitoring] +
EPS));
8044 Breakdown_file <<
"%): ";
8045 Breakdown_file.width(11);
8046 Breakdown_file << Surface_CFx_Inv[iMarker_Monitoring];
8047 Breakdown_file <<
" | Friction (";
8048 Breakdown_file.width(5);
8051 (Surface_CFx_Visc[iMarker_Monitoring] * 100.0)
8052 / (Surface_CFx[iMarker_Monitoring] +
EPS));
8053 Breakdown_file <<
"%): ";
8054 Breakdown_file.width(11);
8056 << Surface_CFx_Visc[iMarker_Monitoring];
8057 Breakdown_file <<
" | Momentum (";
8058 Breakdown_file.width(5);
8061 (Surface_CFx_Mnt[iMarker_Monitoring] * 100.0)
8062 / (Surface_CFx[iMarker_Monitoring] +
EPS));
8063 Breakdown_file <<
"%): ";
8064 Breakdown_file.width(11);
8066 << Surface_CFx_Mnt[iMarker_Monitoring] <<
"\n";
8068 Breakdown_file <<
"Total CFy (";
8069 Breakdown_file.width(5);
8071 <<
SU2_TYPE::Int((Surface_CFy[iMarker_Monitoring] * 100.0) / (Total_CFy +
EPS));
8072 Breakdown_file <<
"%): ";
8073 Breakdown_file.width(11);
8074 Breakdown_file << Surface_CFy[iMarker_Monitoring];
8075 Breakdown_file <<
" | Pressure (";
8076 Breakdown_file.width(5);
8079 (Surface_CFy_Inv[iMarker_Monitoring] * 100.0)
8080 / (Surface_CFy[iMarker_Monitoring] +
EPS));
8081 Breakdown_file <<
"%): ";
8082 Breakdown_file.width(11);
8083 Breakdown_file << Surface_CFy_Inv[iMarker_Monitoring];
8084 Breakdown_file <<
" | Friction (";
8085 Breakdown_file.width(5);
8088 (Surface_CFy_Visc[iMarker_Monitoring] * 100.0)
8089 / (Surface_CFy[iMarker_Monitoring] +
EPS));
8090 Breakdown_file <<
"%): ";
8091 Breakdown_file.width(11);
8093 << Surface_CFy_Visc[iMarker_Monitoring];
8094 Breakdown_file <<
" | Momentum (";
8095 Breakdown_file.width(5);
8098 (Surface_CFy_Mnt[iMarker_Monitoring] * 100.0)
8099 / (Surface_CFy[iMarker_Monitoring] +
EPS));
8100 Breakdown_file <<
"%): ";
8101 Breakdown_file.width(11);
8103 << Surface_CFy_Mnt[iMarker_Monitoring] <<
"\n";
8106 Breakdown_file <<
"Total CFz (";
8107 Breakdown_file.width(5);
8110 (Surface_CFz[iMarker_Monitoring] * 100.0) / (Total_CFz +
EPS));
8111 Breakdown_file <<
"%): ";
8112 Breakdown_file.width(11);
8113 Breakdown_file << Surface_CFz[iMarker_Monitoring];
8114 Breakdown_file <<
" | Pressure (";
8115 Breakdown_file.width(5);
8118 (Surface_CFz_Inv[iMarker_Monitoring] * 100.0)
8119 / (Surface_CFz[iMarker_Monitoring] +
EPS));
8120 Breakdown_file <<
"%): ";
8121 Breakdown_file.width(11);
8122 Breakdown_file << Surface_CFz_Inv[iMarker_Monitoring];
8123 Breakdown_file <<
" | Friction (";
8124 Breakdown_file.width(5);
8127 (Surface_CFz_Visc[iMarker_Monitoring] * 100.0)
8128 / (Surface_CFz[iMarker_Monitoring] +
EPS));
8129 Breakdown_file <<
"%): ";
8130 Breakdown_file.width(11);
8132 << Surface_CFz_Visc[iMarker_Monitoring];
8133 Breakdown_file <<
" | Momentum (";
8134 Breakdown_file.width(5);
8137 (Surface_CFz_Mnt[iMarker_Monitoring] * 100.0)
8138 / (Surface_CFz[iMarker_Monitoring] +
EPS));
8139 Breakdown_file <<
"%): ";
8140 Breakdown_file.width(11);
8142 << Surface_CFz_Mnt[iMarker_Monitoring] <<
"\n";
8146 Breakdown_file <<
"\n";
8151 delete [] Surface_CL;
8152 delete [] Surface_CD;
8153 delete [] Surface_CSF;
8154 delete [] Surface_CEff;
8155 delete [] Surface_CFx;
8156 delete [] Surface_CFy;
8157 delete [] Surface_CFz;
8158 delete [] Surface_CMx;
8159 delete [] Surface_CMy;
8160 delete [] Surface_CMz;
8162 delete [] Surface_CL_Inv;
8163 delete [] Surface_CD_Inv;
8164 delete [] Surface_CSF_Inv;
8165 delete [] Surface_CEff_Inv;
8166 delete [] Surface_CFx_Inv;
8167 delete [] Surface_CFy_Inv;
8168 delete [] Surface_CFz_Inv;
8169 delete [] Surface_CMx_Inv;
8170 delete [] Surface_CMy_Inv;
8171 delete [] Surface_CMz_Inv;
8173 delete [] Surface_CL_Visc;
8174 delete [] Surface_CD_Visc;
8175 delete [] Surface_CSF_Visc;
8176 delete [] Surface_CEff_Visc;
8177 delete [] Surface_CFx_Visc;
8178 delete [] Surface_CFy_Visc;
8179 delete [] Surface_CFz_Visc;
8180 delete [] Surface_CMx_Visc;
8181 delete [] Surface_CMy_Visc;
8182 delete [] Surface_CMz_Visc;
8184 delete [] Surface_CL_Mnt;
8185 delete [] Surface_CD_Mnt;
8186 delete [] Surface_CSF_Mnt;
8187 delete [] Surface_CEff_Mnt;
8188 delete [] Surface_CFx_Mnt;
8189 delete [] Surface_CFy_Mnt;
8190 delete [] Surface_CFz_Mnt;
8191 delete [] Surface_CMx_Mnt;
8192 delete [] Surface_CMy_Mnt;
8193 delete [] Surface_CMz_Mnt;
8195 Breakdown_file.close();
8202 unsigned long iExtIter,
unsigned short val_nZone) {
8204 unsigned short iZone;
8206 for (iZone = 0; iZone < val_nZone; iZone++) {
8225 if (
rank ==
MASTER_NODE) cout << endl <<
"Writing comma-separated values (CSV) surface files." << endl;
8227 switch (config[iZone]->GetKind_Solver()) {
8252 if (Wrt_Vol || Wrt_Srf) {
8253 if (
rank ==
MASTER_NODE) cout <<
"Merging connectivities in the Master node." << endl;
8261 if (
rank ==
MASTER_NODE) cout <<
"Merging coordinates in the Master node." << endl;
8266 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary volume and surface mesh files." << endl;
8269 if (!wrote_base_file)
8271 if (!wrote_surf_file)
8278 if (
rank ==
MASTER_NODE) cout <<
"Merging solution in the Master node." << endl;
8289 if (
rank ==
MASTER_NODE) cout <<
"Writing SU2 native restart file." << endl;
8290 SetRestart(config[iZone], geometry[iZone][
INST_0][MESH_0], solver_container[iZone][
INST_0][MESH_0] , iZone);
8294 switch (FileFormat) {
8300 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file volume solution file." << endl;
8311 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary volume solution file." << endl;
8320 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII volume solution file." << endl;
8329 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary volume files not available in this mode." << endl;
8330 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII volume solution file instead." << endl;
8343 switch (FileFormat) {
8349 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII surface solution file." << endl;
8358 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary surface solution file." << endl;
8366 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII surface solution file." << endl;
8375 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary surface files not available in this mode." << endl;
8376 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII surface solution file instead." << endl;
8406 unsigned long iExtIter,
unsigned short val_nZone) {
8408 unsigned short iZone, iInst, nInst;
8410 for (iZone = 0; iZone < val_nZone; iZone++) {
8414 for (iInst = 0; iInst < nInst; iInst++) {
8421 if (config[iZone]->GetKind_SU2() ==
SU2_DOT) { Wrt_Vol =
false; }
8432 if ((Wrt_Vol || Wrt_Srf)) {
8433 if (
rank ==
MASTER_NODE) cout <<
"Merging connectivities in the Master node." << endl;
8439 if ((Wrt_Vol || Wrt_Srf)) {
8440 if (
rank ==
MASTER_NODE) cout <<
"Merging solution in the Master node." << endl;
8453 switch (FileFormat) {
8459 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file (volume grid)." << endl;
8468 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot Binary file (volume grid)." << endl;
8478 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII file (volume grid)." << endl;
8487 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary volume files not available in this mode." << endl;
8488 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII volume solution file instead." << endl;
8501 switch (FileFormat) {
8507 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file (surface grid)." << endl;
8516 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot Binary file (surface grid)." << endl;
8525 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII file (surface grid)." << endl;
8534 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary surface files not available in this mode." << endl;
8535 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII surface solution file instead." << endl;
8546 if (!wrote_base_file)
8548 if (!wrote_surf_file)
8552 if (Wrt_Vol || Wrt_Srf)
8573 unsigned short iZone;
8574 ofstream output_file;
8582 strcpy (out_file, str.c_str());
8583 strcpy (cstr, out_file);
8584 output_file.precision(15);
8585 output_file.open(cstr, ios::out);
8586 if (val_nZone > 1) {
8587 output_file <<
"NZONE= " << val_nZone << endl;
8592 for (iZone = 0; iZone < val_nZone; iZone++) {
8707 output_file.close();
8714 short iSection, nSection;
8715 unsigned long iVertex, iPoint, Trailing_Point;
8716 su2double *Plane_P0, *Plane_P0_, *Plane_Normal, *Plane_Normal_, *CPressure,
8717 Force[3], ForceInviscid[3], MomentInviscid[3] =
8718 { 0.0, 0.0, 0.0 }, MomentDist[3] = { 0.0, 0.0, 0.0 }, RefDensity,
8719 RefPressure, RefArea, *Velocity_Inf, Gas_Constant, Mach2Vel,
8720 Mach_Motion, Gamma, RefVel2 = 0.0, factor, NDPressure, *Origin,
8721 RefLength, Alpha, CL_Inv,
8722 Xcoord_LeadingEdge = 0.0, Ycoord_LeadingEdge = 0.0, Zcoord_LeadingEdge = 0.0,
8723 Xcoord_TrailingEdge = 0.0, Ycoord_TrailingEdge = 0.0, Zcoord_TrailingEdge = 0.0,
8724 Xcoord_LeadingEdge_ = 0.0,
8725 Xcoord_TrailingEdge_ = 0.0, Ycoord_TrailingEdge_ = 0.0, Zcoord_TrailingEdge_ = 0.0,
8726 MaxDistance, Distance, Chord, Aux, Dihedral_Trailing;
8728 su2double B, Y, C_L, C_L0, Elliptic_Spanload;
8730 vector<su2double> Xcoord_Airfoil, Ycoord_Airfoil, Zcoord_Airfoil,
8732 vector<su2double> Xcoord_Airfoil_, Ycoord_Airfoil_, Zcoord_Airfoil_,
8734 string Marker_Tag, Slice_Filename, Slice_Ext;
8736 unsigned short iDim;
8747 cout << endl <<
"Writing the spanload file (load_distribution.dat).";
8766 RefVel2 = (Mach_Motion * Mach2Vel) * (Mach_Motion * Mach2Vel);
8769 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++)
8770 RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim];
8772 factor = 1.0 / (0.5 * RefDensity * RefArea * RefVel2);
8774 if (geometry->
GetnDim() == 3) {
8778 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
8780 - RefPressure) * factor * RefArea;
8785 for (iSection = 0; iSection < nSection; iSection++) {
8789 Plane_Normal[0] = 0.0; Plane_P0[0] = 0.0;
8790 Plane_Normal[1] = 0.0; Plane_P0[1] = 0.0;
8791 Plane_Normal[2] = 0.0; Plane_P0[2] = 0.0;
8794 Plane_Normal[0] = 1.0;
8798 Plane_Normal[0] = 0.0;
8805 su2double Plane_NormalX_Tilt = Plane_Normal[0]*cos(Tilt_Angle) + Plane_Normal[2]*sin(Tilt_Angle);
8806 su2double Plane_NormalY_Tilt = Plane_Normal[1];
8807 su2double Plane_NormalZ_Tilt = Plane_Normal[2]*cos(Tilt_Angle) - Plane_Normal[0]*sin(Tilt_Angle);
8812 su2double Plane_NormalX_Tilt_Toe = Plane_NormalX_Tilt*cos(Toe_Angle) - Plane_NormalY_Tilt*sin(Toe_Angle);
8813 su2double Plane_NormalY_Tilt_Toe = Plane_NormalX_Tilt*sin(Toe_Angle) + Plane_NormalY_Tilt*cos(Toe_Angle);
8814 su2double Plane_NormalZ_Tilt_Toe = Plane_NormalZ_Tilt;
8818 Plane_Normal[0] = Plane_NormalX_Tilt_Toe;
8819 Plane_Normal[1] = Plane_NormalY_Tilt_Toe;
8820 Plane_Normal[2] = Plane_NormalZ_Tilt_Toe;
8824 Plane_Normal[1] = 1.0;
8831 CPressure, Xcoord_Airfoil, Ycoord_Airfoil, Zcoord_Airfoil,
8832 CPressure_Airfoil,
true, config);
8836 cout << endl <<
"Please check the config file, the section (" << Plane_P0[0] <<
", " << Plane_P0[1] <<
", " << Plane_P0[2] <<
") has not been detected." << endl;
8838 cout << endl <<
"Please check the config file, the section (" << Plane_Normal[0] <<
", " << Plane_Normal[1] <<
", " << Plane_Normal[2] <<
") has not been detected." << endl;
8844 Plane_P0_[0] = 0.0; Plane_Normal_[0] = 0.0;
8845 Plane_P0_[1] = 0.0; Plane_Normal_[1] = 0.0;
8846 Plane_P0_[2] = 0.0; Plane_Normal_[2] = 0.0;
8849 Plane_Normal_[0] = 1.0;
8854 if (iSection == 0) {
8855 Plane_Normal_[0] = 0.0;
8862 su2double Plane_NormalX_Tilt = Plane_Normal[0]*cos(Tilt_Angle) + Plane_Normal[2]*sin(Tilt_Angle);
8863 su2double Plane_NormalY_Tilt = Plane_Normal[1];
8864 su2double Plane_NormalZ_Tilt = Plane_Normal[2]*cos(Tilt_Angle) - Plane_Normal[0]*sin(Tilt_Angle);
8869 su2double Plane_NormalX_Tilt_Toe = Plane_NormalX_Tilt*cos(Toe_Angle) - Plane_NormalY_Tilt*sin(Toe_Angle);
8870 su2double Plane_NormalY_Tilt_Toe = Plane_NormalX_Tilt*sin(Toe_Angle) + Plane_NormalY_Tilt*cos(Toe_Angle);
8871 su2double Plane_NormalZ_Tilt_Toe = Plane_NormalZ_Tilt;
8875 Plane_Normal[0] = Plane_NormalX_Tilt_Toe;
8876 Plane_Normal[1] = Plane_NormalY_Tilt_Toe;
8877 Plane_Normal[2] = Plane_NormalZ_Tilt_Toe;
8881 Plane_Normal_[0] = 0.0;
8888 su2double Plane_NormalX_Tilt = Plane_Normal[0]*cos(Tilt_Angle) + Plane_Normal[2]*sin(Tilt_Angle);
8889 su2double Plane_NormalY_Tilt = Plane_Normal[1];
8890 su2double Plane_NormalZ_Tilt = Plane_Normal[2]*cos(Tilt_Angle) - Plane_Normal[0]*sin(Tilt_Angle);
8895 su2double Plane_NormalX_Tilt_Toe = Plane_NormalX_Tilt*cos(Toe_Angle) - Plane_NormalY_Tilt*sin(Toe_Angle);
8896 su2double Plane_NormalY_Tilt_Toe = Plane_NormalX_Tilt*sin(Toe_Angle) + Plane_NormalY_Tilt*cos(Toe_Angle);
8897 su2double Plane_NormalZ_Tilt_Toe = Plane_NormalZ_Tilt;
8901 Plane_Normal[0] = Plane_NormalX_Tilt_Toe;
8902 Plane_Normal[1] = Plane_NormalY_Tilt_Toe;
8903 Plane_Normal[2] = Plane_NormalZ_Tilt_Toe;
8908 Plane_Normal_[1] = 1.0;
8914 CPressure, Xcoord_Airfoil_, Ycoord_Airfoil_, Zcoord_Airfoil_,
8915 CPressure_Airfoil_,
true, config);
8923 Xcoord_LeadingEdge = 1E6; Xcoord_TrailingEdge = -1E6;
8924 for (iVertex = 0; iVertex < Xcoord_Airfoil.size(); iVertex++) {
8925 if (Xcoord_Airfoil[iVertex] < Xcoord_LeadingEdge) {
8926 Xcoord_LeadingEdge = Xcoord_Airfoil[iVertex];
8927 Ycoord_LeadingEdge = Ycoord_Airfoil[iVertex];
8928 Zcoord_LeadingEdge = Zcoord_Airfoil[iVertex];
8930 if (Xcoord_Airfoil[iVertex] > Xcoord_TrailingEdge) {
8931 Xcoord_TrailingEdge = Xcoord_Airfoil[iVertex];
8932 Ycoord_TrailingEdge = Ycoord_Airfoil[iVertex];
8933 Zcoord_TrailingEdge = Zcoord_Airfoil[iVertex];
8937 Chord = (Xcoord_TrailingEdge-Xcoord_LeadingEdge);
8941 Xcoord_LeadingEdge_ = 1E6; Xcoord_TrailingEdge_ = -1E6;
8942 for (iVertex = 0; iVertex < Xcoord_Airfoil_.size(); iVertex++) {
8943 if (Xcoord_Airfoil_[iVertex] < Xcoord_LeadingEdge_) {
8944 Xcoord_LeadingEdge_ = Xcoord_Airfoil_[iVertex];
8946 if (Xcoord_Airfoil_[iVertex] > Xcoord_TrailingEdge_) {
8947 Xcoord_TrailingEdge_ = Xcoord_Airfoil_[iVertex];
8948 Ycoord_TrailingEdge_ = Ycoord_Airfoil_[iVertex];
8949 Zcoord_TrailingEdge_ = Zcoord_Airfoil_[iVertex];
8953 if (iSection == 0) {
8954 Dihedral_Trailing = atan((Zcoord_TrailingEdge_ - Zcoord_TrailingEdge) / (Ycoord_TrailingEdge_ - Ycoord_TrailingEdge))*180/
PI_NUMBER;
8957 Dihedral_Trailing = atan((Zcoord_TrailingEdge - Zcoord_TrailingEdge_) / (Ycoord_TrailingEdge - Ycoord_TrailingEdge_))*180/
PI_NUMBER;
8966 if (iSection == 0) {
8967 Cp_File.open(
"cp_sections.dat", ios::out);
8968 Cp_File <<
"TITLE = \"Airfoil sections\"" << endl;
8969 Cp_File <<
"VARIABLES = \"x/c\",\"C<sub>p</sub>\",\"x\",\"y\",\"z\",\"y/c\",\"z/c\"" << endl;
8971 Cp_File.open(
"cp_sections.dat", ios::app);
8975 Cp_File <<
"ZONE T=\"Theta = " << theta_deg <<
" deg\", I= " << Xcoord_Airfoil.size() <<
", F=POINT" <<
"\n";
8979 << Xcoord_Airfoil.size() <<
", F=POINT" <<
"\n";
8982 << Xcoord_Airfoil.size() <<
", F=POINT" <<
"\n";
8989 for (iVertex = 0; iVertex < Xcoord_Airfoil.size(); iVertex++) {
8991 su2double XCoord = Xcoord_Airfoil[iVertex];
8992 su2double YCoord = Ycoord_Airfoil[iVertex];
8993 su2double ZCoord = Zcoord_Airfoil[iVertex];
9002 YCoord = (Ycoord_Airfoil[iVertex]*cos(Angle) - Zcoord_Airfoil[iVertex]*sin(Angle)) + config->
GetNacelleLocation(1);
9003 ZCoord = (Zcoord_Airfoil[iVertex]*cos(Angle) + Ycoord_Airfoil[iVertex]*sin(Angle)) + config->
GetNacelleLocation(2);
9008 Cp_File << (Xcoord_Airfoil[iVertex] - Xcoord_LeadingEdge) / Chord <<
" " << CPressure_Airfoil[iVertex]
9009 <<
" " << XCoord * 12.0 <<
" " << YCoord * 12.0 <<
" " << ZCoord * 12.0
9010 <<
" " << (Ycoord_Airfoil[iVertex] - Ycoord_LeadingEdge) / Chord <<
" " << (Zcoord_Airfoil[iVertex] - Zcoord_LeadingEdge) / Chord <<
"\n";
9013 Cp_File << (Xcoord_Airfoil[iVertex] - Xcoord_LeadingEdge) / Chord <<
" " << CPressure_Airfoil[iVertex]
9014 <<
" " << XCoord <<
" " << YCoord <<
" " << ZCoord
9015 <<
" " << (Ycoord_Airfoil[iVertex] - Ycoord_LeadingEdge) / Chord <<
" " << (Zcoord_Airfoil[iVertex] - Zcoord_LeadingEdge) / Chord <<
"\n";
9026 ForceInviscid[0] = 0.0; ForceInviscid[1] = 0.0; ForceInviscid[2] = 0.0; MomentInviscid[1] = 0.0;
9028 for (iVertex = 0; iVertex < Xcoord_Airfoil.size() - 1; iVertex++) {
9030 NDPressure = 0.5 * (CPressure_Airfoil[iVertex] + CPressure_Airfoil[iVertex + 1]);
9032 Force[0] = -(Zcoord_Airfoil[iVertex + 1] - Zcoord_Airfoil[iVertex]) * NDPressure;
9034 Force[2] = (Xcoord_Airfoil[iVertex + 1] - Xcoord_Airfoil[iVertex]) * NDPressure;
9036 ForceInviscid[0] += Force[0];
9037 ForceInviscid[1] += Force[1];
9038 ForceInviscid[2] += Force[2];
9040 MomentDist[0] = 0.5 * (Xcoord_Airfoil[iVertex] + Xcoord_Airfoil[iVertex + 1]) - Origin[0];
9041 MomentDist[1] = 0.5 * (Ycoord_Airfoil[iVertex] + Ycoord_Airfoil[iVertex + 1]) - Origin[1];
9042 MomentDist[2] = 0.5 * (Zcoord_Airfoil[iVertex] + Zcoord_Airfoil[iVertex + 1]) - Origin[3];
9044 MomentInviscid[1] += (Force[0] * MomentDist[2] - Force[2] * MomentDist[0]) / RefLength;
9050 MaxDistance = 0.0; Trailing_Point = 0;
9052 for (iVertex = 1; iVertex < Xcoord_Airfoil.size(); iVertex++) {
9054 Distance = sqrt(pow(Xcoord_Airfoil[iVertex] - Xcoord_Airfoil[Trailing_Point], 2.0) +
9055 pow(Ycoord_Airfoil[iVertex] - Ycoord_Airfoil[Trailing_Point], 2.0) +
9056 pow(Zcoord_Airfoil[iVertex] - Zcoord_Airfoil[Trailing_Point], 2.0));
9058 if (MaxDistance < Distance) { MaxDistance = Distance; }
9062 Chord = MaxDistance;
9064 CL_Inv = cos(Dihedral_Trailing *
PI_NUMBER / 180.0) * fabs( -ForceInviscid[0] * sin(Alpha) + ForceInviscid[2] * cos(Alpha) )/ Chord;
9072 Y = Ycoord_Airfoil[0];
9074 Elliptic_Spanload = (C_L0 / RefLength) * sqrt(fabs(1.0-Aux*Aux));
9082 if (iSection == 0) {
9085 Load_File.open(
"load_distribution.csv", ios::out);
9086 Load_File <<
"\"Percent Semispan\",\"Sectional C_L\",\"Spanload (c C_L / c_ref) \",\"Elliptic Spanload\"" << endl;
9089 Load_File.open(
"load_distribution.dat", ios::out);
9090 Load_File <<
"TITLE = \"Load distribution\"" << endl;
9091 Load_File <<
"VARIABLES = \"Percent Semispan\",\"Sectional C<sub>L</sub>\",\"Spanload (c C<sub>L</sub> / c<sub>ref</sub>) \",\"Elliptic Spanload\"" << endl;
9092 Load_File <<
"ZONE T=\"Wing load distribution\"" << endl;
9096 else Load_File.open(
"load_distribution.dat", ios::app);
9103 Load_File << 100.0*Ycoord_Airfoil[0]/(0.5*
B) <<
", " << CL_Inv <<
", " << Chord*CL_Inv / RefLength <<
", " << Elliptic_Spanload << endl;
9105 Load_File << 100.0*Ycoord_Airfoil[0]/(0.5*
B) <<
" " << CL_Inv <<
" " << Chord*CL_Inv / RefLength <<
" " << Elliptic_Spanload << endl;
9121 delete[] Plane_Normal;
9122 delete[] Plane_Normal_;
9130 unsigned short iMarker, icommas, Boundary, iDim;
9131 unsigned long iVertex, iPoint, (*Point2Vertex)[2], nPointLocal = 0, nPointGlobal = 0;
9132 su2double XCoord, YCoord, ZCoord, Pressure, PressureCoeff = 0, Cp, CpTarget, *Normal = NULL, Area, PressDiff;
9133 bool *PointInDomain;
9134 string text_line, surfCp_filename;
9135 ifstream Surface_file;
9136 char buffer[50], cstr[200];
9143 nPointGlobal = nPointLocal;
9146 Point2Vertex =
new unsigned long[nPointGlobal][2];
9147 PointInDomain =
new bool[nPointGlobal];
9149 for (iPoint = 0; iPoint < nPointGlobal; iPoint ++)
9150 PointInDomain[iPoint] =
false;
9152 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
9159 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9170 Point2Vertex[iPoint][0] = iMarker;
9171 Point2Vertex[iPoint][1] = iVertex;
9172 PointInDomain[iPoint] =
true;
9182 surfCp_filename =
"TargetCp";
9183 strcpy (cstr, surfCp_filename.c_str());
9198 strcat (cstr, buffer);
9202 string::size_type position;
9204 Surface_file.open(cstr, ios::in);
9206 if (!(Surface_file.fail())) {
9208 getline(Surface_file, text_line);
9210 while (getline(Surface_file, text_line)) {
9211 for (icommas = 0; icommas < 50; icommas++) {
9212 position = text_line.find(
",", 0 );
9213 if (position!=string::npos) text_line.erase (position,1);
9215 stringstream point_line(text_line);
9217 if (geometry->
GetnDim() == 2) point_line >> iPoint >> XCoord >> YCoord >> Pressure >> PressureCoeff;
9218 if (geometry->
GetnDim() == 3) point_line >> iPoint >> XCoord >> YCoord >> ZCoord >> Pressure >> PressureCoeff;
9220 if (PointInDomain[iPoint]) {
9224 iMarker = Point2Vertex[iPoint][0];
9225 iVertex = Point2Vertex[iPoint][1];
9233 Surface_file.close();
9240 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
9247 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9255 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++)
9256 Area += Normal[iDim]*Normal[iDim];
9259 PressDiff += Area * (CpTarget - Cp) * (CpTarget - Cp);
9266 su2double MyPressDiff = PressDiff; PressDiff = 0.0;
9274 delete [] Point2Vertex;
9275 delete [] PointInDomain;
9281 unsigned short iMarker, icommas, Boundary, iDim;
9282 unsigned long iVertex, iPoint, (*Point2Vertex)[2], nPointLocal = 0, nPointGlobal = 0;
9283 su2double XCoord, YCoord, ZCoord, PressureCoeff, HeatFlux = 0.0, HeatFluxDiff, HeatFluxTarget, *Normal = NULL, Area,
9285 bool *PointInDomain;
9286 string text_line, surfHeatFlux_filename;
9287 ifstream Surface_file;
9288 char buffer[50], cstr[200];
9295 nPointGlobal = nPointLocal;
9298 Point2Vertex =
new unsigned long[nPointGlobal][2];
9299 PointInDomain =
new bool[nPointGlobal];
9301 for (iPoint = 0; iPoint < nPointGlobal; iPoint ++)
9302 PointInDomain[iPoint] =
false;
9304 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
9311 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9322 Point2Vertex[iPoint][0] = iMarker;
9323 Point2Vertex[iPoint][1] = iVertex;
9324 PointInDomain[iPoint] =
true;
9333 surfHeatFlux_filename =
"TargetHeatFlux";
9334 strcpy (cstr, surfHeatFlux_filename.c_str());
9349 strcat (cstr, buffer);
9353 string::size_type position;
9355 Surface_file.open(cstr, ios::in);
9357 if (!(Surface_file.fail())) {
9359 getline(Surface_file, text_line);
9361 while (getline(Surface_file, text_line)) {
9362 for (icommas = 0; icommas < 50; icommas++) {
9363 position = text_line.find(
",", 0 );
9364 if (position!=string::npos) text_line.erase (position,1);
9366 stringstream point_line(text_line);
9368 if (geometry->
GetnDim() == 2) point_line >> iPoint >> XCoord >> YCoord >> Pressure >> PressureCoeff >> Cf >> HeatFlux;
9369 if (geometry->
GetnDim() == 3) point_line >> iPoint >> XCoord >> YCoord >> ZCoord >> Pressure >> PressureCoeff >> Cf >> HeatFlux;
9371 if (PointInDomain[iPoint]) {
9375 iMarker = Point2Vertex[iPoint][0];
9376 iVertex = Point2Vertex[iPoint][1];
9384 Surface_file.close();
9390 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
9397 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9401 HeatFlux = solver_container->
GetHeatFlux(iMarker, iVertex);
9405 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++)
9406 Area += Normal[iDim]*Normal[iDim];
9409 HeatFluxDiff += Area * (HeatFluxTarget - HeatFlux) * (HeatFluxTarget - HeatFlux);
9417 su2double MyHeatFluxDiff = HeatFluxDiff; HeatFluxDiff = 0.0;
9425 delete [] Point2Vertex;
9426 delete [] PointInDomain;
9432 ofstream EquivArea_file, FuncGrad_file;
9433 unsigned short iMarker = 0, iDim;
9434 short *AzimuthalAngle = NULL;
9435 su2double Gamma, auxXCoord, auxYCoord, auxZCoord, InverseDesign = 0.0, DeltaX, Coord_i, Coord_j, jp1Coord, *Coord = NULL, MeanFuntion,
9436 *Face_Normal = NULL, auxArea, auxPress, Mach, Beta, R_Plane, Pressure_Inf,
9437 ModVelocity_Inf, Velocity_Inf[3], factor, *Xcoord = NULL, *Ycoord = NULL, *Zcoord = NULL,
9438 *Pressure = NULL, *FaceArea = NULL, *EquivArea = NULL, *TargetArea = NULL, *NearFieldWeight = NULL,
9439 *Weight = NULL, jFunction, jp1Function;
9440 unsigned long jVertex, iVertex, iPoint, nVertex_NearField = 0, auxPoint,
9441 *IdPoint = NULL, *IdDomain = NULL, auxDomain;
9442 unsigned short iPhiAngle;
9443 ofstream NearFieldEA_file; ifstream TargetEA_file;
9448 unsigned short nDim = geometry->
GetnDim();
9454 Beta = sqrt(Mach*Mach-1.0);
9460 ModVelocity_Inf = 0;
9461 for (iDim = 0; iDim < 3; iDim++)
9462 ModVelocity_Inf += Velocity_Inf[iDim] * Velocity_Inf[iDim];
9464 factor = 4.0*sqrt(2.0*Beta*R_Plane) / (Gamma*Pressure_Inf*Mach*Mach);
9466 if (
rank ==
MASTER_NODE) cout << endl <<
"Writing Equivalent Area files.";
9472 nVertex_NearField = 0;
9475 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9483 if ((Face_Normal[nDim-1] > 0.0) && (Coord[nDim-1] < 0.0)) nVertex_NearField ++;
9489 Xcoord =
new su2double[nVertex_NearField];
9490 Ycoord =
new su2double[nVertex_NearField];
9491 Zcoord =
new su2double[nVertex_NearField];
9492 AzimuthalAngle =
new short[nVertex_NearField];
9493 IdPoint =
new unsigned long[nVertex_NearField];
9494 IdDomain =
new unsigned long[nVertex_NearField];
9495 Pressure =
new su2double[nVertex_NearField];
9496 FaceArea =
new su2double[nVertex_NearField];
9497 EquivArea =
new su2double[nVertex_NearField];
9498 TargetArea =
new su2double[nVertex_NearField];
9499 NearFieldWeight =
new su2double[nVertex_NearField];
9500 Weight =
new su2double[nVertex_NearField];
9504 nVertex_NearField = 0;
9507 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9512 if ((Face_Normal[nDim-1] > 0.0) && (Coord[nDim-1] < 0.0)) {
9514 IdPoint[nVertex_NearField] = iPoint;
9515 Xcoord[nVertex_NearField] = geometry->
node[iPoint]->
GetCoord(0);
9516 Ycoord[nVertex_NearField] = geometry->
node[iPoint]->
GetCoord(1);
9519 AzimuthalAngle[nVertex_NearField] = 0;
9523 Zcoord[nVertex_NearField] = geometry->
node[iPoint]->
GetCoord(2);
9527 su2double YcoordRot = Ycoord[nVertex_NearField];
9528 su2double ZcoordRot = Xcoord[nVertex_NearField]*sin(AoA) + Zcoord[nVertex_NearField]*cos(AoA);
9533 AngleDouble = fabs(atan(-YcoordRot/ZcoordRot)*180.0/
PI_NUMBER);
9539 if ((AngleDouble >= FixAzimuthalLine - 0.1) && (AngleDouble <= FixAzimuthalLine + 0.1)) AngleDouble = FixAzimuthalLine - 0.1;
9542 if (AngleInt >= 0) AzimuthalAngle[nVertex_NearField] = AngleInt;
9543 else AzimuthalAngle[nVertex_NearField] = 180 + AngleInt;
9546 if (AzimuthalAngle[nVertex_NearField] <= 60) {
9548 FaceArea[nVertex_NearField] = fabs(Face_Normal[nDim-1]);
9549 nVertex_NearField ++;
9560 unsigned long nLocalVertex_NearField = 0, MaxLocalVertex_NearField = 0;
9563 unsigned long *Buffer_Receive_nVertex = NULL;
9565 Buffer_Receive_nVertex =
new unsigned long [nProcessor];
9570 nLocalVertex_NearField = 0;
9573 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9579 if ((Face_Normal[nDim-1] > 0.0) && (Coord[nDim-1] < 0.0))
9580 nLocalVertex_NearField ++;
9583 unsigned long *Buffer_Send_nVertex =
new unsigned long [1];
9584 Buffer_Send_nVertex[0] = nLocalVertex_NearField;
9591 delete [] Buffer_Send_nVertex;
9596 unsigned long *Buffer_Send_IdPoint =
new unsigned long [MaxLocalVertex_NearField];
9600 su2double *Buffer_Receive_Xcoord = NULL;
9601 su2double *Buffer_Receive_Ycoord = NULL;
9602 su2double *Buffer_Receive_Zcoord = NULL;
9603 unsigned long *Buffer_Receive_IdPoint = NULL;
9604 su2double *Buffer_Receive_Pressure = NULL;
9605 su2double *Buffer_Receive_FaceArea = NULL;
9608 Buffer_Receive_Xcoord =
new su2double[nProcessor*MaxLocalVertex_NearField];
9609 Buffer_Receive_Ycoord =
new su2double[nProcessor*MaxLocalVertex_NearField];
9610 Buffer_Receive_Zcoord =
new su2double[nProcessor*MaxLocalVertex_NearField];
9611 Buffer_Receive_IdPoint =
new unsigned long[nProcessor*MaxLocalVertex_NearField];
9612 Buffer_Receive_Pressure =
new su2double[nProcessor*MaxLocalVertex_NearField];
9613 Buffer_Receive_FaceArea =
new su2double[nProcessor*MaxLocalVertex_NearField];
9616 unsigned long nBuffer_Xcoord = MaxLocalVertex_NearField;
9617 unsigned long nBuffer_Ycoord = MaxLocalVertex_NearField;
9618 unsigned long nBuffer_Zcoord = MaxLocalVertex_NearField;
9619 unsigned long nBuffer_IdPoint = MaxLocalVertex_NearField;
9620 unsigned long nBuffer_Pressure = MaxLocalVertex_NearField;
9621 unsigned long nBuffer_FaceArea = MaxLocalVertex_NearField;
9623 for (iVertex = 0; iVertex < MaxLocalVertex_NearField; iVertex++) {
9624 Buffer_Send_IdPoint[iVertex] = 0; Buffer_Send_Pressure[iVertex] = 0.0;
9625 Buffer_Send_FaceArea[iVertex] = 0.0; Buffer_Send_Xcoord[iVertex] = 0.0;
9626 Buffer_Send_Ycoord[iVertex] = 0.0; Buffer_Send_Zcoord[iVertex] = 0.0;
9631 nLocalVertex_NearField = 0;
9634 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9640 if ((Face_Normal[nDim-1] > 0.0) && (Coord[nDim-1] < 0.0)) {
9641 Buffer_Send_IdPoint[nLocalVertex_NearField] = iPoint;
9642 Buffer_Send_Xcoord[nLocalVertex_NearField] = geometry->
node[iPoint]->
GetCoord(0);
9643 Buffer_Send_Ycoord[nLocalVertex_NearField] = geometry->
node[iPoint]->
GetCoord(1);
9644 Buffer_Send_Zcoord[nLocalVertex_NearField] = geometry->
node[iPoint]->
GetCoord(2);
9646 Buffer_Send_FaceArea[nLocalVertex_NearField] = fabs(Face_Normal[nDim-1]);
9647 nLocalVertex_NearField++;
9659 delete [] Buffer_Send_Xcoord;
9660 delete [] Buffer_Send_Ycoord;
9661 delete [] Buffer_Send_Zcoord;
9662 delete [] Buffer_Send_IdPoint;
9663 delete [] Buffer_Send_Pressure;
9664 delete [] Buffer_Send_FaceArea;
9668 Xcoord =
new su2double[nVertex_NearField];
9669 Ycoord =
new su2double[nVertex_NearField];
9670 Zcoord =
new su2double[nVertex_NearField];
9671 AzimuthalAngle =
new short[nVertex_NearField];
9672 IdPoint =
new unsigned long[nVertex_NearField];
9673 IdDomain =
new unsigned long[nVertex_NearField];
9674 Pressure =
new su2double[nVertex_NearField];
9675 FaceArea =
new su2double[nVertex_NearField];
9676 EquivArea =
new su2double[nVertex_NearField];
9677 TargetArea =
new su2double[nVertex_NearField];
9678 NearFieldWeight =
new su2double[nVertex_NearField];
9679 Weight =
new su2double[nVertex_NearField];
9681 nVertex_NearField = 0;
9682 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++)
9683 for (iVertex = 0; iVertex < Buffer_Receive_nVertex[iProcessor]; iVertex++) {
9684 Xcoord[nVertex_NearField] = Buffer_Receive_Xcoord[iProcessor*MaxLocalVertex_NearField+iVertex];
9685 Ycoord[nVertex_NearField] = Buffer_Receive_Ycoord[iProcessor*MaxLocalVertex_NearField+iVertex];
9688 AzimuthalAngle[nVertex_NearField] = 0;
9692 Zcoord[nVertex_NearField] = Buffer_Receive_Zcoord[iProcessor*MaxLocalVertex_NearField+iVertex];
9696 su2double YcoordRot = Ycoord[nVertex_NearField];
9697 su2double ZcoordRot = Xcoord[nVertex_NearField]*sin(AoA) + Zcoord[nVertex_NearField]*cos(AoA);
9702 AngleDouble = fabs(atan(-YcoordRot/ZcoordRot)*180.0/
PI_NUMBER);
9708 if ((AngleDouble >= FixAzimuthalLine - 0.1) && (AngleDouble <= FixAzimuthalLine + 0.1))
9709 AngleDouble = FixAzimuthalLine - 0.1;
9713 if (AngleInt >= 0) AzimuthalAngle[nVertex_NearField] = AngleInt;
9714 else AzimuthalAngle[nVertex_NearField] = 180 + AngleInt;
9717 if (AzimuthalAngle[nVertex_NearField] <= 60) {
9718 IdPoint[nVertex_NearField] = Buffer_Receive_IdPoint[iProcessor*MaxLocalVertex_NearField+iVertex];
9719 Pressure[nVertex_NearField] = Buffer_Receive_Pressure[iProcessor*MaxLocalVertex_NearField+iVertex];
9720 FaceArea[nVertex_NearField] = Buffer_Receive_FaceArea[iProcessor*MaxLocalVertex_NearField+iVertex];
9721 IdDomain[nVertex_NearField] = iProcessor;
9722 nVertex_NearField++;
9727 delete [] Buffer_Receive_nVertex;
9729 delete [] Buffer_Receive_Xcoord;
9730 delete [] Buffer_Receive_Ycoord;
9731 delete [] Buffer_Receive_Zcoord;
9732 delete [] Buffer_Receive_IdPoint;
9733 delete [] Buffer_Receive_Pressure;
9734 delete [] Buffer_Receive_FaceArea;
9742 vector<short> PhiAngleList;
9743 vector<short>::iterator IterPhiAngleList;
9745 for (iVertex = 0; iVertex < nVertex_NearField; iVertex++)
9746 PhiAngleList.push_back(AzimuthalAngle[iVertex]);
9748 sort( PhiAngleList.begin(), PhiAngleList.end());
9749 IterPhiAngleList = unique( PhiAngleList.begin(), PhiAngleList.end());
9750 PhiAngleList.resize( IterPhiAngleList - PhiAngleList.begin() );
9754 vector<vector<su2double> > Xcoord_PhiAngle; Xcoord_PhiAngle.resize(PhiAngleList.size());
9755 vector<vector<su2double> > Ycoord_PhiAngle; Ycoord_PhiAngle.resize(PhiAngleList.size());
9756 vector<vector<su2double> > Zcoord_PhiAngle; Zcoord_PhiAngle.resize(PhiAngleList.size());
9757 vector<vector<unsigned long> > IdPoint_PhiAngle; IdPoint_PhiAngle.resize(PhiAngleList.size());
9758 vector<vector<unsigned long> > IdDomain_PhiAngle; IdDomain_PhiAngle.resize(PhiAngleList.size());
9759 vector<vector<su2double> > Pressure_PhiAngle; Pressure_PhiAngle.resize(PhiAngleList.size());
9760 vector<vector<su2double> > FaceArea_PhiAngle; FaceArea_PhiAngle.resize(PhiAngleList.size());
9761 vector<vector<su2double> > EquivArea_PhiAngle; EquivArea_PhiAngle.resize(PhiAngleList.size());
9762 vector<vector<su2double> > TargetArea_PhiAngle; TargetArea_PhiAngle.resize(PhiAngleList.size());
9763 vector<vector<su2double> > NearFieldWeight_PhiAngle; NearFieldWeight_PhiAngle.resize(PhiAngleList.size());
9764 vector<vector<su2double> > Weight_PhiAngle; Weight_PhiAngle.resize(PhiAngleList.size());
9768 for (iVertex = 0; iVertex < nVertex_NearField; iVertex++)
9769 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
9770 if (AzimuthalAngle[iVertex] == PhiAngleList[iPhiAngle]) {
9771 Xcoord_PhiAngle[iPhiAngle].push_back(Xcoord[iVertex]);
9772 Ycoord_PhiAngle[iPhiAngle].push_back(Ycoord[iVertex]);
9773 Zcoord_PhiAngle[iPhiAngle].push_back(Zcoord[iVertex]);
9774 IdPoint_PhiAngle[iPhiAngle].push_back(IdPoint[iVertex]);
9775 IdDomain_PhiAngle[iPhiAngle].push_back(IdDomain[iVertex]);
9776 Pressure_PhiAngle[iPhiAngle].push_back(Pressure[iVertex]);
9777 FaceArea_PhiAngle[iPhiAngle].push_back(FaceArea[iVertex]);
9778 EquivArea_PhiAngle[iPhiAngle].push_back(EquivArea[iVertex]);
9779 TargetArea_PhiAngle[iPhiAngle].push_back(TargetArea[iVertex]);
9780 NearFieldWeight_PhiAngle[iPhiAngle].push_back(NearFieldWeight[iVertex]);
9781 Weight_PhiAngle[iPhiAngle].push_back(Weight[iVertex]);
9786 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
9787 for (iVertex = 0; iVertex < Xcoord_PhiAngle[iPhiAngle].size(); iVertex++)
9788 for (jVertex = 0; jVertex < Xcoord_PhiAngle[iPhiAngle].size() - 1 - iVertex; jVertex++)
9789 if (Xcoord_PhiAngle[iPhiAngle][jVertex] > Xcoord_PhiAngle[iPhiAngle][jVertex+1]) {
9790 auxXCoord = Xcoord_PhiAngle[iPhiAngle][jVertex]; Xcoord_PhiAngle[iPhiAngle][jVertex] = Xcoord_PhiAngle[iPhiAngle][jVertex+1]; Xcoord_PhiAngle[iPhiAngle][jVertex+1] = auxXCoord;
9791 auxYCoord = Ycoord_PhiAngle[iPhiAngle][jVertex]; Ycoord_PhiAngle[iPhiAngle][jVertex] = Ycoord_PhiAngle[iPhiAngle][jVertex+1]; Ycoord_PhiAngle[iPhiAngle][jVertex+1] = auxYCoord;
9792 auxZCoord = Zcoord_PhiAngle[iPhiAngle][jVertex]; Zcoord_PhiAngle[iPhiAngle][jVertex] = Zcoord_PhiAngle[iPhiAngle][jVertex+1]; Zcoord_PhiAngle[iPhiAngle][jVertex+1] = auxZCoord;
9793 auxPress = Pressure_PhiAngle[iPhiAngle][jVertex]; Pressure_PhiAngle[iPhiAngle][jVertex] = Pressure_PhiAngle[iPhiAngle][jVertex+1]; Pressure_PhiAngle[iPhiAngle][jVertex+1] = auxPress;
9794 auxArea = FaceArea_PhiAngle[iPhiAngle][jVertex]; FaceArea_PhiAngle[iPhiAngle][jVertex] = FaceArea_PhiAngle[iPhiAngle][jVertex+1]; FaceArea_PhiAngle[iPhiAngle][jVertex+1] = auxArea;
9795 auxPoint = IdPoint_PhiAngle[iPhiAngle][jVertex]; IdPoint_PhiAngle[iPhiAngle][jVertex] = IdPoint_PhiAngle[iPhiAngle][jVertex+1]; IdPoint_PhiAngle[iPhiAngle][jVertex+1] = auxPoint;
9796 auxDomain = IdDomain_PhiAngle[iPhiAngle][jVertex]; IdDomain_PhiAngle[iPhiAngle][jVertex] = IdDomain_PhiAngle[iPhiAngle][jVertex+1]; IdDomain_PhiAngle[iPhiAngle][jVertex+1] = auxDomain;
9802 unsigned short nVertex = Xcoord_PhiAngle[0].size();
9803 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++) {
9804 unsigned short nVertex_aux = Xcoord_PhiAngle[iPhiAngle].size();
9805 if (nVertex_aux != nVertex) cout <<
"Be careful!!! one azimuth list is shorter than the other"<< endl;
9806 nVertex = min(nVertex, nVertex_aux);
9811 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++) {
9812 EquivArea_PhiAngle[iPhiAngle][0] = 0.0;
9813 for (iVertex = 1; iVertex < EquivArea_PhiAngle[iPhiAngle].size(); iVertex++) {
9814 EquivArea_PhiAngle[iPhiAngle][iVertex] = 0.0;
9816 Coord_i = Xcoord_PhiAngle[iPhiAngle][iVertex]*cos(AoA) - Zcoord_PhiAngle[iPhiAngle][iVertex]*sin(AoA);
9818 for (jVertex = 0; jVertex < iVertex-1; jVertex++) {
9820 Coord_j = Xcoord_PhiAngle[iPhiAngle][jVertex]*cos(AoA) - Zcoord_PhiAngle[iPhiAngle][jVertex]*sin(AoA);
9821 jp1Coord = Xcoord_PhiAngle[iPhiAngle][jVertex+1]*cos(AoA) - Zcoord_PhiAngle[iPhiAngle][jVertex+1]*sin(AoA);
9823 jFunction = factor*(Pressure_PhiAngle[iPhiAngle][jVertex] - Pressure_Inf)*sqrt(Coord_i-Coord_j);
9824 jp1Function = factor*(Pressure_PhiAngle[iPhiAngle][jVertex+1] - Pressure_Inf)*sqrt(Coord_i-jp1Coord);
9826 DeltaX = (jp1Coord-Coord_j);
9827 MeanFuntion = 0.5*(jp1Function + jFunction);
9828 EquivArea_PhiAngle[iPhiAngle][iVertex] += DeltaX * MeanFuntion;
9835 NearFieldEA_file.precision(15);
9839 NearFieldEA_file.open(
"Equivalent_Area.dat", ios::out);
9840 NearFieldEA_file <<
"TITLE = \"Equivalent Area evaluation at each azimuthal angle\"" <<
"\n";
9843 NearFieldEA_file <<
"VARIABLES = \"Height (in) at r="<< R_Plane*12.0 <<
" in. (cyl. coord. system)\"";
9845 NearFieldEA_file <<
"VARIABLES = \"Height (m) at r="<< R_Plane <<
" m. (cylindrical coordinate system)\"";
9847 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++) {
9849 NearFieldEA_file <<
", \"Equivalent Area (ft<sup>2</sup>), <greek>F</greek>= " << PhiAngleList[iPhiAngle] <<
" deg.\"";
9851 NearFieldEA_file <<
", \"Equivalent Area (m<sup>2</sup>), <greek>F</greek>= " << PhiAngleList[iPhiAngle] <<
" deg.\"";
9854 NearFieldEA_file <<
"\n";
9855 for (iVertex = 0; iVertex < EquivArea_PhiAngle[0].size(); iVertex++) {
9857 su2double XcoordRot = Xcoord_PhiAngle[0][iVertex]*cos(AoA) - Zcoord_PhiAngle[0][iVertex]*sin(AoA);
9858 su2double XcoordRot_init = Xcoord_PhiAngle[0][0]*cos(AoA) - Zcoord_PhiAngle[0][0]*sin(AoA);
9861 NearFieldEA_file << scientific << (XcoordRot - XcoordRot_init) * 12.0;
9863 NearFieldEA_file << scientific << (XcoordRot - XcoordRot_init);
9865 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++) {
9866 NearFieldEA_file << scientific <<
", " << EquivArea_PhiAngle[iPhiAngle][iVertex];
9869 NearFieldEA_file <<
"\n";
9872 NearFieldEA_file.close();
9880 vector<vector<su2double> > TargetArea_PhiAngle_Trans;
9881 TargetEA_file.open(
"TargetEA.dat", ios::in);
9883 if (TargetEA_file.fail()) {
9885 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
9886 for (iVertex = 0; iVertex < TargetArea_PhiAngle[iPhiAngle].size(); iVertex++)
9887 TargetArea_PhiAngle[iPhiAngle][iVertex] = 0.0;
9894 getline(TargetEA_file, line);
9895 getline(TargetEA_file, line);
9897 while (TargetEA_file) {
9900 getline(TargetEA_file, line);
9901 istringstream is(line);
9902 vector<su2double> row;
9903 unsigned short iter = 0;
9907 getline(is, token,
',');
9909 istringstream js(token);
9916 if (iter != 0) row.push_back(data);
9920 TargetArea_PhiAngle_Trans.push_back(row);
9923 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
9924 for (iVertex = 0; iVertex < EquivArea_PhiAngle[iPhiAngle].size(); iVertex++)
9925 TargetArea_PhiAngle[iPhiAngle][iVertex] = TargetArea_PhiAngle_Trans[iVertex][iPhiAngle];
9936 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
9937 for (iVertex = 0; iVertex < EquivArea_PhiAngle[iPhiAngle].size(); iVertex++) {
9938 Weight_PhiAngle[iPhiAngle][iVertex] = 1.0;
9939 Coord_i = Xcoord_PhiAngle[iPhiAngle][iVertex];
9941 su2double Difference = EquivArea_PhiAngle[iPhiAngle][iVertex]-TargetArea_PhiAngle[iPhiAngle][iVertex];
9942 su2double percentage = fabs(Difference)*100/fabs(TargetArea_PhiAngle[iPhiAngle][iVertex]);
9944 if ((percentage < 0.1) || (Coord_i < XCoordBegin_OF) || (Coord_i > XCoordEnd_OF)) Difference = 0.0;
9946 InverseDesign += EAScaleFactor*PhiFactor*Weight_PhiAngle[iPhiAngle][iVertex]*Difference*Difference;
9952 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
9953 for (iVertex = 0; iVertex < EquivArea_PhiAngle[iPhiAngle].size(); iVertex++) {
9954 Coord_i = Xcoord_PhiAngle[iPhiAngle][iVertex];
9955 NearFieldWeight_PhiAngle[iPhiAngle][iVertex] = 0.0;
9956 for (jVertex = iVertex; jVertex < EquivArea_PhiAngle[iPhiAngle].size(); jVertex++) {
9957 Coord_j = Xcoord_PhiAngle[iPhiAngle][jVertex];
9958 Weight_PhiAngle[iPhiAngle][iVertex] = 1.0;
9960 su2double Difference = EquivArea_PhiAngle[iPhiAngle][jVertex]-TargetArea_PhiAngle[iPhiAngle][jVertex];
9961 su2double percentage = fabs(Difference)*100/fabs(TargetArea_PhiAngle[iPhiAngle][jVertex]);
9963 if ((percentage < 0.1) || (Coord_j < XCoordBegin_OF) || (Coord_j > XCoordEnd_OF)) Difference = 0.0;
9965 NearFieldWeight_PhiAngle[iPhiAngle][iVertex] += EAScaleFactor*PhiFactor*Weight_PhiAngle[iPhiAngle][iVertex]*2.0*Difference*factor*sqrt(Coord_j-Coord_i);
9971 EquivArea_file.precision(15);
9975 EquivArea_file.open(
"nearfield_flow.dat", ios::out);
9976 EquivArea_file <<
"TITLE = \"Equivalent Area evaluation at each azimuthal angle\"" <<
"\n";
9979 EquivArea_file <<
"VARIABLES = \"Height (in) at r="<< R_Plane*12.0 <<
" in. (cyl. coord. system)\",\"Equivalent Area (ft<sup>2</sup>)\",\"Target Equivalent Area (ft<sup>2</sup>)\",\"Cp\"" <<
"\n";
9981 EquivArea_file <<
"VARIABLES = \"Height (m) at r="<< R_Plane <<
" m. (cylindrical coordinate system)\",\"Equivalent Area (m<sup>2</sup>)\",\"Target Equivalent Area (m<sup>2</sup>)\",\"Cp\"" <<
"\n";
9983 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++) {
9984 EquivArea_file << fixed <<
"ZONE T= \"<greek>F</greek>=" << PhiAngleList[iPhiAngle] <<
" deg.\"" <<
"\n";
9985 for (iVertex = 0; iVertex < Xcoord_PhiAngle[iPhiAngle].size(); iVertex++) {
9987 su2double XcoordRot = Xcoord_PhiAngle[0][iVertex]*cos(AoA) - Zcoord_PhiAngle[0][iVertex]*sin(AoA);
9988 su2double XcoordRot_init = Xcoord_PhiAngle[0][0]*cos(AoA) - Zcoord_PhiAngle[0][0]*sin(AoA);
9991 EquivArea_file << scientific << (XcoordRot - XcoordRot_init) * 12.0;
9993 EquivArea_file << scientific << (XcoordRot - XcoordRot_init);
9995 EquivArea_file << scientific <<
", " << EquivArea_PhiAngle[iPhiAngle][iVertex]
9996 <<
", " << TargetArea_PhiAngle[iPhiAngle][iVertex] <<
", " << (Pressure_PhiAngle[iPhiAngle][iVertex]-Pressure_Inf)/Pressure_Inf <<
"\n";
10000 EquivArea_file.close();
10006 FuncGrad_file.precision(15);
10010 FuncGrad_file.open(
"WeightNF.dat", ios::out);
10012 FuncGrad_file << scientific <<
"-1.0";
10013 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
10014 FuncGrad_file << scientific <<
"\t" << PhiAngleList[iPhiAngle];
10015 FuncGrad_file <<
"\n";
10017 for (iVertex = 0; iVertex < NearFieldWeight_PhiAngle[0].size(); iVertex++) {
10018 su2double XcoordRot = Xcoord_PhiAngle[0][iVertex]*cos(AoA) - Zcoord_PhiAngle[0][iVertex]*sin(AoA);
10019 FuncGrad_file << scientific << XcoordRot;
10020 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
10021 FuncGrad_file << scientific <<
"\t" << NearFieldWeight_PhiAngle[iPhiAngle][iVertex];
10022 FuncGrad_file <<
"\n";
10024 FuncGrad_file.close();
10030 delete [] Xcoord;
delete [] Ycoord;
delete [] Zcoord;
10031 delete [] AzimuthalAngle;
delete [] IdPoint;
delete [] IdDomain;
10032 delete [] Pressure;
delete [] FaceArea;
10033 delete [] EquivArea;
delete [] TargetArea;
10034 delete [] NearFieldWeight;
delete [] Weight;
10060 unsigned short iMarker, iDim, iMarker_Analyze;
10061 unsigned long iPoint, iVertex;
10062 su2double xCoord = 0.0, yCoord = 0.0, zCoord = 0.0, Area = 0.0, *Vector, TotalArea = 0.0;
10063 su2double xCoord_CG = 0.0, yCoord_CG = 0.0, zCoord_CG = 0.0, TipRadius, HubRadius, Distance = 0.0, Distance_Mirror = 0.0;
10064 su2double *r, MinDistance, xCoord_ = 0.0, yCoord_ = 0.0, zCoord_ = 0;
10065 unsigned short iStation, iAngle, nAngle;
10067 su2double *** ProbeArray, dx = 0.0, dy = 0.0, dz = 0.0, dx_ = 0.0, dy_ = 0.0, dz_ = 0.0, UpVector[3], radians, RotatedVector[3];
10068 su2double Pressure, SoundSpeed, Velocity2, Mach, Gamma, TotalPressure, Mach_Inf, TotalPressure_Inf,
10069 Temperature, TotalTemperature, Pressure_Inf, Temperature_Inf, TotalTemperature_Inf, Velocity_Inf, Density;
10070 unsigned short nDim = geometry->
GetnDim();
10071 unsigned short Theta, nStation;
10072 unsigned long nVertex_Surface, nLocalVertex_Surface, MaxLocalVertex_Surface;
10073 unsigned long Buffer_Send_nVertex[1], *Buffer_Recv_nVertex = NULL;
10074 unsigned long Total_Index;
10075 unsigned short Theta_DC60 = 60, nStation_DC60 = 5;
10076 su2double PT_Mean, Mach_Mean, q_Mean, PT, q, *PT_Sector, PT_Sector_Min, DC60, *PT_Station, *PT_Station_Min, *Mach_Station, *Mach_Station_Min, IDR, IDC, IDC_Mach;
10082 su2double Mach_ij, Mach_ip1j, Mach_im1j, Mach_ijp1, Mach_ijm1, Filtered_Mach;
10083 su2double Alpha_ij, Alpha_ip1j, Alpha_im1j, Alpha_ijp1, Alpha_ijm1, Filtered_Alpha;
10084 su2double Beta_ij, Beta_ip1j, Beta_im1j, Beta_ijp1, Beta_ijm1, Filtered_Beta;
10087 int iProcessor, nProcessor;
10095 ofstream SurfFlow_file;
10100 else strcpy (cstr,
"surface_analysis.dat");
10102 SurfFlow_file.precision(15);
10104 SurfFlow_file.open(cstr, ios::out);
10107 SurfFlow_file <<
"# vtk DataFile Version 3.0" << endl;
10108 SurfFlow_file <<
"vtk output" << endl;
10109 SurfFlow_file <<
"ASCII" << endl;
10112 SurfFlow_file <<
"TITLE = \"Surface Analysis\"" <<endl;
10113 SurfFlow_file <<
"VARIABLES = \"y(in)\", \"z(in)\", \"PT/PT<sub>inf</sub>\", \"TT/TT<sub>inf</sub>\", \"P/P<sub>inf</sub>\", \"T/T<sub>inf</sub>\", \"v<sub>x</sub>/v<sub>inf</sub>\", \"v<sub>y</sub>/v<sub>inf</sub>\", \"v<sub>z</sub>/v<sub>inf</sub>\", \"<greek>a</greek> (deg)\", \"<greek>b</greek> (deg)\", \"Mach\", \"Filtered <greek>a</greek> (deg)\", \"Filtered <greek>b</greek> (deg)\", \"Filtered Mach\"" << endl;
10120 for (iMarker_Analyze = 0; iMarker_Analyze < config->
GetnMarker_Analyze(); iMarker_Analyze++) {
10124 nVertex_Surface = 0; nLocalVertex_Surface = 0; MaxLocalVertex_Surface = 0;
10130 nLocalVertex_Surface = 0;
10131 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
10133 if (Marker_TagBound == Analyze_TagBound) {
10134 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
10136 if (geometry->
node[iPoint]->
GetDomain()) nLocalVertex_Surface++;
10144 Buffer_Send_nVertex[0] = nLocalVertex_Surface;
10145 if (
rank ==
MASTER_NODE) Buffer_Recv_nVertex =
new unsigned long [nProcessor];
10151 MaxLocalVertex_Surface = nLocalVertex_Surface;
10157 su2double *Buffer_Send_Coord_x = NULL, *Buffer_Recv_Coord_x = NULL;
10158 Buffer_Send_Coord_x =
new su2double [MaxLocalVertex_Surface];
10160 su2double *Buffer_Send_Coord_y = NULL, *Buffer_Recv_Coord_y = NULL;
10161 Buffer_Send_Coord_y =
new su2double [MaxLocalVertex_Surface];
10163 su2double *Buffer_Send_Coord_z = NULL, *Buffer_Recv_Coord_z = NULL;
10164 if (nDim == 3) Buffer_Send_Coord_z =
new su2double [MaxLocalVertex_Surface];
10166 su2double *Buffer_Send_PT = NULL, *Buffer_Recv_PT = NULL;
10167 Buffer_Send_PT =
new su2double [MaxLocalVertex_Surface];
10169 su2double *Buffer_Send_TT = NULL, *Buffer_Recv_TT = NULL;
10170 Buffer_Send_TT =
new su2double [MaxLocalVertex_Surface];
10172 su2double *Buffer_Send_P = NULL, *Buffer_Recv_P = NULL;
10173 Buffer_Send_P =
new su2double [MaxLocalVertex_Surface];
10175 su2double *Buffer_Send_T = NULL, *Buffer_Recv_T = NULL;
10176 Buffer_Send_T =
new su2double [MaxLocalVertex_Surface];
10178 su2double *Buffer_Send_Mach = NULL, *Buffer_Recv_Mach = NULL;
10179 Buffer_Send_Mach =
new su2double [MaxLocalVertex_Surface];
10181 su2double *Buffer_Send_Vel_x = NULL, *Buffer_Recv_Vel_x = NULL;
10182 Buffer_Send_Vel_x =
new su2double [MaxLocalVertex_Surface];
10184 su2double *Buffer_Send_Vel_y = NULL, *Buffer_Recv_Vel_y = NULL;
10185 Buffer_Send_Vel_y =
new su2double [MaxLocalVertex_Surface];
10187 su2double *Buffer_Send_Vel_z = NULL, *Buffer_Recv_Vel_z = NULL;
10188 if (nDim == 3) Buffer_Send_Vel_z =
new su2double [MaxLocalVertex_Surface];
10190 su2double *Buffer_Send_q = NULL, *Buffer_Recv_q = NULL;
10191 Buffer_Send_q =
new su2double [MaxLocalVertex_Surface];
10193 su2double *Buffer_Send_Area = NULL, *Buffer_Recv_Area = NULL;
10194 Buffer_Send_Area =
new su2double [MaxLocalVertex_Surface];
10199 Buffer_Recv_Coord_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
10200 Buffer_Recv_Coord_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
10201 if (nDim == 3) Buffer_Recv_Coord_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
10202 Buffer_Recv_PT =
new su2double [nProcessor*MaxLocalVertex_Surface];
10203 Buffer_Recv_TT =
new su2double [nProcessor*MaxLocalVertex_Surface];
10204 Buffer_Recv_P =
new su2double [nProcessor*MaxLocalVertex_Surface];
10205 Buffer_Recv_T =
new su2double [nProcessor*MaxLocalVertex_Surface];
10206 Buffer_Recv_Mach =
new su2double [nProcessor*MaxLocalVertex_Surface];
10207 Buffer_Recv_Vel_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
10208 Buffer_Recv_Vel_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
10210 Buffer_Recv_Vel_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
10212 Buffer_Recv_q =
new su2double [nProcessor*MaxLocalVertex_Surface];
10213 Buffer_Recv_Area =
new su2double [nProcessor*MaxLocalVertex_Surface];
10220 nVertex_Surface = 0;
10221 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
10223 if (Marker_TagBound == Analyze_TagBound) {
10225 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
10230 Buffer_Send_Coord_x[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(0);
10231 Buffer_Send_Coord_y[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(1);
10232 if (nDim == 3) { Buffer_Send_Coord_z[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(2); }
10239 Mach = sqrt(Velocity2)/SoundSpeed;
10242 Mach_Inf = config->
GetMach();
10249 Buffer_Send_P[nVertex_Surface] = Pressure / Pressure_Inf;
10250 Buffer_Send_T[nVertex_Surface] = Temperature / Temperature_Inf;
10251 Buffer_Send_Mach[nVertex_Surface] = Mach;
10253 TotalPressure = Pressure * pow( 1.0 + Mach * Mach * 0.5 * (Gamma - 1.0), Gamma / (Gamma - 1.0));
10254 TotalPressure_Inf = Pressure_Inf * pow( 1.0 + Mach_Inf * Mach_Inf * 0.5 * (Gamma - 1.0), Gamma / (Gamma - 1.0));
10255 Buffer_Send_PT[nVertex_Surface] = TotalPressure / TotalPressure_Inf;
10257 TotalTemperature = Temperature * (1.0 + Mach * Mach * 0.5 * (Gamma - 1.0));
10258 TotalTemperature_Inf = Temperature_Inf * (1.0 + Mach * Mach * 0.5 * (Gamma - 1.0));
10259 Buffer_Send_TT[nVertex_Surface] = TotalTemperature / TotalTemperature_Inf;
10261 Buffer_Send_Vel_x[nVertex_Surface] = solver->
GetNodes()->
GetVelocity(iPoint,0) / Velocity_Inf;
10262 Buffer_Send_Vel_y[nVertex_Surface] = solver->
GetNodes()->
GetVelocity(iPoint,1) / Velocity_Inf;
10264 Buffer_Send_Vel_z[nVertex_Surface] = solver->
GetNodes()->
GetVelocity(iPoint,2) / Velocity_Inf;
10267 Buffer_Send_q[nVertex_Surface] = 0.5*Density*Velocity2;
10270 Area = 0.0;
for (iDim = 0; iDim < nDim; iDim++) { Area += Vector[iDim]*Vector[iDim]; } Area = sqrt(Area);
10271 Buffer_Send_Area[nVertex_Surface] = Area;
10277 Buffer_Send_Coord_x[nVertex_Surface] *= 12.0;
10278 Buffer_Send_Coord_y[nVertex_Surface] *= 12.0;
10279 if (nDim == 3) Buffer_Send_Coord_z[nVertex_Surface] *= 12.0;
10280 Buffer_Send_Area[nVertex_Surface] *= 144.0;
10312 for (iVertex = 0; iVertex < MaxLocalVertex_Surface; iVertex++) {
10313 Buffer_Recv_Coord_x[iVertex] = Buffer_Send_Coord_x[iVertex];
10314 Buffer_Recv_Coord_y[iVertex] = Buffer_Send_Coord_y[iVertex];
10315 if (nDim == 3) Buffer_Recv_Coord_z[iVertex] = Buffer_Send_Coord_z[iVertex];
10316 Buffer_Recv_PT[iVertex] = Buffer_Send_PT[iVertex];
10317 Buffer_Recv_TT[iVertex] = Buffer_Send_TT[iVertex];
10318 Buffer_Recv_P[iVertex] = Buffer_Send_P[iVertex];
10319 Buffer_Recv_T[iVertex] = Buffer_Send_T[iVertex];
10320 Buffer_Recv_Mach[iVertex] = Buffer_Send_Mach[iVertex];
10321 Buffer_Recv_Vel_x[iVertex] = Buffer_Send_Vel_x[iVertex];
10322 Buffer_Recv_Vel_y[iVertex] = Buffer_Send_Vel_y[iVertex];
10323 if (nDim == 3) Buffer_Recv_Vel_z[iVertex] = Buffer_Send_Vel_z[iVertex];
10324 Buffer_Recv_q[iVertex] = Buffer_Send_q[iVertex];
10325 Buffer_Recv_Area[iVertex] = Buffer_Send_Area[iVertex];
10334 TotalArea = 0.0; xCoord_CG = 0.0; yCoord_CG = 0.0; zCoord_CG = 0.0; PT_Mean = 0.0; Mach_Mean = 0.0; q_Mean = 0.0;
10336 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10337 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10341 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10345 xCoord = Buffer_Recv_Coord_x[Total_Index];
10346 yCoord = Buffer_Recv_Coord_y[Total_Index];
10347 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10348 PT = Buffer_Recv_PT[Total_Index];
10349 Mach = Buffer_Recv_Mach[Total_Index];
10350 q = Buffer_Recv_q[Total_Index];
10352 Area = Buffer_Recv_Area[Total_Index];
10354 xCoord_CG += xCoord*Area;
10355 yCoord_CG += yCoord*Area;
10356 zCoord_CG += zCoord*Area;
10357 PT_Mean += PT*Area;
10358 Mach_Mean += PT*Area;
10366 xCoord_CG = xCoord_CG / TotalArea;
10367 yCoord_CG = yCoord_CG / TotalArea;
10368 zCoord_CG = zCoord_CG / TotalArea;
10369 PT_Mean /= TotalArea;
10370 Mach_Mean /= TotalArea;
10371 q_Mean /= TotalArea;
10375 if (Engine_HalfModel) { yCoord_CG = 0.0; }
10379 TipRadius = 1E-6; HubRadius = 1E6;
10380 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10381 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10385 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10389 xCoord = Buffer_Recv_Coord_x[Total_Index];
10390 yCoord = Buffer_Recv_Coord_y[Total_Index];
10391 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10394 Distance = sqrt((xCoord_CG-xCoord)*(xCoord_CG-xCoord) +
10395 (yCoord_CG-yCoord)*(yCoord_CG-yCoord));
10398 Distance = sqrt((xCoord_CG-xCoord)*(xCoord_CG-xCoord) +
10399 (yCoord_CG-yCoord)*(yCoord_CG-yCoord) +
10400 (zCoord_CG-zCoord)*(zCoord_CG-zCoord));
10402 if (Distance > TipRadius) TipRadius = Distance;
10403 if (Distance < HubRadius) HubRadius = Distance;
10408 if (HubRadius/TipRadius < 0.05) HubRadius = 0.0;
10412 Theta = Theta_DC60;
10413 nStation = nStation_DC60;
10421 ProbeArray =
new su2double ** [nAngle];
10422 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10423 ProbeArray[iAngle] =
new su2double * [nStation];
10424 for (iStation = 0; iStation < nStation; iStation++) {
10425 ProbeArray[iAngle][iStation] =
new su2double [5];
10431 r[0] = HubRadius; r[nStation] = TipRadius;
10432 for (iStation = 1; iStation < nStation; iStation++) {
10433 r[iStation] = sqrt( r[iStation-1]*r[iStation-1] + (r[nStation]*r[nStation] - r[0]*r[0])/
float(nStation) );
10438 UpVector[0] = 0.0; UpVector[1] = 0.0; UpVector[2] = 1.0;
10440 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10442 radians = -iAngle*Theta*2.0*
PI_NUMBER/360;
10443 RotatedVector[0] = UpVector[0];
10444 RotatedVector[1] = UpVector[1] * cos(radians) - UpVector[2] * sin(radians);
10445 RotatedVector[2] = UpVector[1] * sin(radians) + UpVector[2] * cos(radians);
10447 for (iStation = 1; iStation <= nStation; iStation++) {
10448 ProbeArray[iAngle][iStation-1][0] = xCoord_CG+RotatedVector[0]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10449 ProbeArray[iAngle][iStation-1][1] = yCoord_CG+RotatedVector[1]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10450 ProbeArray[iAngle][iStation-1][2] = zCoord_CG+RotatedVector[2]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10457 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10459 for (iStation = 0; iStation < nStation; iStation++) {
10460 xCoord_ = ProbeArray[iAngle][iStation][0];
10461 yCoord_ = ProbeArray[iAngle][iStation][1];
10462 zCoord_ = ProbeArray[iAngle][iStation][2];
10466 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10467 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10469 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10470 xCoord = Buffer_Recv_Coord_x[Total_Index];
10471 yCoord = Buffer_Recv_Coord_y[Total_Index];
10472 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10474 dx = (xCoord_ - xCoord); dy = (yCoord_ - yCoord);
10475 if (nDim == 3) dz = (zCoord_ - zCoord);
10477 Distance = dx*dx + dy*dy;
if (nDim == 3) Distance += dz*dz; Distance = sqrt(Distance);
10479 if (Engine_HalfModel) {
10483 dx_ = (xCoord_ - xCoord); dy_ = (yCoord_ - yCoord);
10484 if (nDim == 3) dz_ = (zCoord_ - zCoord);
10486 Distance_Mirror = dx_*dx_ + dy_*dy_;
10487 if (nDim == 3) Distance_Mirror += dz_*dz_;
10488 Distance_Mirror = sqrt(Distance_Mirror);
10490 if (Distance_Mirror < Distance) {
10491 Distance = Distance_Mirror;
10492 dx = dx_; dy = dy_;
10493 if (nDim == 3) dz = dz_;
10498 if (Distance <= MinDistance) {
10499 MinDistance = Distance;
10500 ProbeArray[iAngle][iStation][3] = Buffer_Recv_PT[Total_Index];
10501 ProbeArray[iAngle][iStation][4] = Buffer_Recv_q[Total_Index];
10513 PT_Mean = 0.0; q_Mean = 0.0;
10514 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10515 PT_Sector[iAngle] = 0.0;
10516 for (iStation = 0; iStation < nStation; iStation++) {
10517 PT_Sector[iAngle] += ProbeArray[iAngle][iStation][3]/float(nStation);
10518 PT_Mean += ProbeArray[iAngle][iStation][3]/float(nStation*nAngle);
10519 q_Mean += ProbeArray[iAngle][iStation][4]/float(nStation*nAngle);
10525 PT_Sector_Min = PT_Sector[0];
10526 for (iAngle = 1; iAngle < nAngle; iAngle++) {
10527 if (PT_Sector[iAngle] <= PT_Sector_Min) PT_Sector_Min = PT_Sector[iAngle];
10532 Mach_Inf = config->
GetMach();
10535 0.5 * (Gamma - 1.0), Gamma / (Gamma - 1.0));
10537 if (q_Mean != 0.0) DC60 = ((PT_Mean - PT_Sector_Min)*TotalPressure_Inf)/q_Mean;
10548 delete [] PT_Sector;
10550 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10551 for (iStation = 0; iStation < nStation; iStation++) {
10552 delete[] ProbeArray[iAngle][iStation];
10555 delete[] ProbeArray;
10567 ProbeArray =
new su2double ** [nAngle];
10568 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10569 ProbeArray[iAngle] =
new su2double * [nStation];
10570 for (iStation = 0; iStation < nStation; iStation++) {
10571 ProbeArray[iAngle][iStation] =
new su2double [4];
10577 r[0] = HubRadius; r[nStation] = TipRadius;
10578 for (iStation = 1; iStation < nStation; iStation++) {
10579 r[iStation] = sqrt( r[iStation-1]*r[iStation-1] + (r[nStation]*r[nStation] - r[0]*r[0])/
float(nStation) );
10584 UpVector[0] = 0.0; UpVector[1] = 0.0; UpVector[2] = 1.0;
10586 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10588 radians = -iAngle*Theta*2.0*
PI_NUMBER/360;
10589 RotatedVector[0] = UpVector[0];
10590 RotatedVector[1] = UpVector[1] * cos(radians) - UpVector[2] * sin(radians);
10591 RotatedVector[2] = UpVector[1] * sin(radians) + UpVector[2] * cos(radians);
10593 for (iStation = 1; iStation <= nStation; iStation++) {
10594 ProbeArray[iAngle][iStation-1][0] = xCoord_CG+RotatedVector[0]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10595 ProbeArray[iAngle][iStation-1][1] = yCoord_CG+RotatedVector[1]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10596 ProbeArray[iAngle][iStation-1][2] = zCoord_CG+RotatedVector[2]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10603 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10604 for (iStation = 0; iStation < nStation; iStation++) {
10605 xCoord_ = ProbeArray[iAngle][iStation][0];
10606 yCoord_ = ProbeArray[iAngle][iStation][1];
10607 zCoord_ = ProbeArray[iAngle][iStation][2];
10611 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10612 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10614 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10615 xCoord = Buffer_Recv_Coord_x[Total_Index];
10616 yCoord = Buffer_Recv_Coord_y[Total_Index];
10617 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10619 dx = (xCoord_ - xCoord); dy = (yCoord_ - yCoord);
10620 if (nDim == 3) dz = (zCoord_ - zCoord);
10622 Distance = dx*dx + dy*dy;
if (nDim == 3) Distance += dz*dz; Distance = sqrt(Distance);
10624 if (Engine_HalfModel) {
10628 dx_ = (xCoord_ - xCoord); dy_ = (yCoord_ - yCoord);
10629 if (nDim == 3) dz_ = (zCoord_ - zCoord);
10631 Distance_Mirror = dx_*dx_ + dy_*dy_;
10632 if (nDim == 3) Distance_Mirror += dz_*dz_;
10633 Distance_Mirror = sqrt(Distance_Mirror);
10635 if (Distance_Mirror < Distance) {
10636 Distance = Distance_Mirror;
10637 dx = dx_; dy = dy_;
10638 if (nDim == 3) dz = dz_;
10643 if (Distance <= MinDistance) {
10644 MinDistance = Distance;
10645 ProbeArray[iAngle][iStation][3] = Buffer_Recv_PT[Total_Index];
10658 PT_Station_Min =
new su2double [nStation];
10661 for (iStation = 0; iStation < nStation; iStation++) {
10662 PT_Station[iStation] = 0.0;
10663 PT_Station_Min[iStation] = ProbeArray[0][iStation][3];
10664 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10665 PT = ProbeArray[iAngle][iStation][3];
10666 PT_Station[iStation] += PT / float(nAngle);
10667 if (PT <= PT_Station_Min[iStation] ) PT_Station_Min[iStation] = PT;
10668 PT_Mean += ProbeArray[iAngle][iStation][3]/float(nStation*nAngle);
10675 for (iStation = 0; iStation < nStation-1; iStation++) {
10676 IDC = max (IDC, 0.5*((PT_Station[iStation] - PT_Station_Min[iStation])/PT_Mean
10677 + (PT_Station[iStation+1] - PT_Station_Min[iStation+1])/PT_Mean) );
10685 for (iStation = 0; iStation < nStation; iStation++) {
10686 IDR = max (IDR, (PT_Mean-PT_Station[iStation])/PT_Mean);
10695 delete [] PT_Station_Min;
10696 delete [] PT_Station;
10702 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10703 for (iStation = 0; iStation < nStation; iStation++) {
10704 xCoord_ = ProbeArray[iAngle][iStation][0];
10705 yCoord_ = ProbeArray[iAngle][iStation][1];
10706 zCoord_ = ProbeArray[iAngle][iStation][2];
10710 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10711 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10713 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10715 xCoord = Buffer_Recv_Coord_x[Total_Index];
10716 yCoord = Buffer_Recv_Coord_y[Total_Index];
10717 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10719 dx = (xCoord_ - xCoord); dy = (yCoord_ - yCoord);
10720 if (nDim == 3) dz = (zCoord_ - zCoord);
10722 Distance = dx*dx + dy*dy;
10723 if (nDim == 3) Distance += dz*dz;
10724 Distance = sqrt(Distance);
10726 if (Engine_HalfModel) {
10730 dx_ = (xCoord_ - xCoord); dy_ = (yCoord_ - yCoord);
10731 if (nDim == 3) dz_ = (zCoord_ - zCoord);
10733 Distance_Mirror = dx_*dx_ + dy_*dy_;
10734 if (nDim == 3) Distance_Mirror += dz_*dz_;
10735 Distance_Mirror = sqrt(Distance_Mirror);
10737 if (Distance_Mirror < Distance) {
10738 Distance = Distance_Mirror;
10739 dx = dx_; dy = dy_;
10740 if (nDim == 3) dz = dz_;
10745 if (Distance <= MinDistance) {
10746 MinDistance = Distance;
10747 ProbeArray[iAngle][iStation][3] = Buffer_Recv_Mach[Total_Index];
10759 Mach_Station =
new su2double [nStation];
10760 Mach_Station_Min =
new su2double [nStation];
10763 for (iStation = 0; iStation < nStation; iStation++) {
10764 Mach_Station[iStation] = 0.0;
10765 Mach_Station_Min[iStation] = ProbeArray[0][iStation][3];
10766 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10767 Mach = ProbeArray[iAngle][iStation][3];
10768 Mach_Station[iStation] += Mach / float(nAngle);
10769 if (Mach <= Mach_Station_Min[iStation] ) Mach_Station_Min[iStation] = Mach;
10770 Mach_Mean += ProbeArray[iAngle][iStation][3]/float(nStation*nAngle);
10777 for (iStation = 0; iStation < nStation-1; iStation++) {
10778 if (Mach_Mean != 0)
10779 IDC_Mach = max (IDC_Mach, 0.5*((Mach_Station[iStation] - Mach_Station_Min[iStation])/Mach_Mean
10780 + (Mach_Station[iStation+1] - Mach_Station_Min[iStation+1])/Mach_Mean) );
10788 delete [] Mach_Station_Min;
10789 delete [] Mach_Station;
10794 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10795 for (iStation = 0; iStation < nStation; iStation++) {
10796 delete[] ProbeArray[iAngle][iStation];
10799 delete[] ProbeArray;
10803 Theta = 10; nStation = 20;
10810 ProbeArray =
new su2double ** [nAngle];
10811 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10812 ProbeArray[iAngle] =
new su2double * [nStation];
10813 for (iStation = 0; iStation < nStation; iStation++) {
10814 ProbeArray[iAngle][iStation] =
new su2double [11];
10821 r[nStation] = TipRadius;
10823 for (iStation = 1; iStation < nStation; iStation++) {
10824 r[iStation] = sqrt( r[iStation-1]*r[iStation-1] + (r[nStation]*r[nStation] - r[0]*r[0])/
float(nStation) );
10829 UpVector[0] = 0.0; UpVector[1] = 0.0; UpVector[2] = 1.0;
10831 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10833 radians = -iAngle*Theta*2.0*
PI_NUMBER/360;
10834 RotatedVector[0] = UpVector[0];
10835 RotatedVector[1] = UpVector[1] * cos(radians) - UpVector[2] * sin(radians);
10836 RotatedVector[2] = UpVector[1] * sin(radians) + UpVector[2] * cos(radians);
10838 for (iStation = 1; iStation <= nStation; iStation++) {
10839 ProbeArray[iAngle][iStation-1][0] = xCoord_CG+RotatedVector[0]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10840 ProbeArray[iAngle][iStation-1][1] = yCoord_CG+RotatedVector[1]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10841 ProbeArray[iAngle][iStation-1][2] = zCoord_CG+RotatedVector[2]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10848 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10849 for (iStation = 0; iStation < nStation; iStation++) {
10850 xCoord_ = ProbeArray[iAngle][iStation][0];
10851 yCoord_ = ProbeArray[iAngle][iStation][1];
10852 zCoord_ = ProbeArray[iAngle][iStation][2];
10856 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10857 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10859 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10860 xCoord = Buffer_Recv_Coord_x[Total_Index];
10861 yCoord = Buffer_Recv_Coord_y[Total_Index];
10862 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10864 dx = (xCoord_ - xCoord); dy = (yCoord_ - yCoord);
10865 if (nDim == 3) dz = (zCoord_ - zCoord);
10867 Distance = dx*dx + dy*dy;
if (nDim == 3) Distance += dz*dz; Distance = sqrt(Distance);
10871 if (Engine_HalfModel) {
10875 dx_ = (xCoord_ - xCoord);
10876 dy_ = (yCoord_ - yCoord);
10877 if (nDim == 3) dz_ = (zCoord_ - zCoord);
10879 Distance_Mirror = dx_*dx_ + dy_*dy_;
10880 if (nDim == 3) Distance_Mirror += dz_*dz_;
10881 Distance_Mirror = sqrt(Distance_Mirror);
10883 if (Distance_Mirror < Distance) {
10885 Distance = Distance_Mirror;
10886 dx = dx_; dy = dy_;
10887 if (nDim == 3) dz = dz_;
10893 if (Distance <= MinDistance) {
10894 MinDistance = Distance;
10895 ProbeArray[iAngle][iStation][3] = Buffer_Recv_PT[Total_Index];
10896 ProbeArray[iAngle][iStation][4] = Buffer_Recv_TT[Total_Index];
10897 ProbeArray[iAngle][iStation][5] = Buffer_Recv_P[Total_Index];
10898 ProbeArray[iAngle][iStation][6] = Buffer_Recv_T[Total_Index];
10899 ProbeArray[iAngle][iStation][7] = Buffer_Recv_Mach[Total_Index];
10900 ProbeArray[iAngle][iStation][8] = Buffer_Recv_Vel_x[Total_Index];
10901 ProbeArray[iAngle][iStation][9] = SignFlip * Buffer_Recv_Vel_y[Total_Index];
10902 if (nDim == 3) ProbeArray[iAngle][iStation][10] = Buffer_Recv_Vel_z[Total_Index];
10914 yCoord_CG = -yCoord_CG;
10915 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10916 for (iStation = 0; iStation < nStation; iStation++) {
10917 ProbeArray[iAngle][iStation][9] = -ProbeArray[iAngle][iStation][9];
10918 ProbeArray[iAngle][iStation][1] = -ProbeArray[iAngle][iStation][1];
10926 SurfFlow_file <<
"\nDATASET UNSTRUCTURED_GRID" << endl;
10927 SurfFlow_file <<
"POINTS " << nAngle*nStation <<
" float" << endl;
10928 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10929 for (iStation = 0; iStation < nStation; iStation++) {
10930 SurfFlow_file << ProbeArray[iAngle][iStation][1]-yCoord_CG <<
" " << ProbeArray[iAngle][iStation][2]-zCoord_CG <<
" 0.0 " <<
" ";
10934 SurfFlow_file <<
"\nCELLS " << nAngle*(nStation-1) <<
" "<< nAngle*(nStation-1)*5 << endl;
10935 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10936 for (iStation = 0; iStation < nStation-1; iStation++) {
10937 a = iAngle*nStation+iStation; b = a + nStation; c = b+1; d = a +1;
10938 if (iAngle == nAngle-1) { b = iStation; c = b+1; }
10939 SurfFlow_file <<
"4 " << a <<
" "<< b <<
" "<< c <<
" "<< d <<
" ";
10943 SurfFlow_file <<
"\nCELL_TYPES " << nAngle*(nStation-1) << endl;
10944 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10945 for (iStation = 0; iStation < nStation-1; iStation++) {
10946 SurfFlow_file <<
"9 " ;
10950 SurfFlow_file <<
"\nPOINT_DATA " << nAngle*nStation << endl;
10951 SurfFlow_file <<
"SCALARS PT/PT_inf float" << endl;
10952 SurfFlow_file <<
"LOOKUP_TABLE default" << endl;
10954 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10955 for (iStation = 0; iStation < nStation; iStation++) {
10956 SurfFlow_file << ProbeArray[iAngle][iStation][3] <<
" ";
10960 SurfFlow_file <<
"SCALARS TT/TT_inf float" << endl;
10961 SurfFlow_file <<
"LOOKUP_TABLE default" << endl;
10963 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10964 for (iStation = 0; iStation < nStation; iStation++) {
10965 SurfFlow_file << ProbeArray[iAngle][iStation][4] <<
" ";
10969 SurfFlow_file <<
"SCALARS Alpha float" << endl;
10970 SurfFlow_file <<
"LOOKUP_TABLE default" << endl;
10972 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10973 for (iStation = 0; iStation < nStation; iStation++) {
10974 Alpha = atan(ProbeArray[iAngle][iStation][10]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
10975 SurfFlow_file << Alpha <<
" ";
10979 SurfFlow_file <<
"SCALARS Beta float" << endl;
10980 SurfFlow_file <<
"LOOKUP_TABLE default" << endl;
10982 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10983 for (iStation = 0; iStation < nStation; iStation++) {
10984 Beta = atan(ProbeArray[iAngle][iStation][9]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
10985 SurfFlow_file << Beta <<
" ";
10989 SurfFlow_file <<
"SCALARS Mach float" << endl;
10990 SurfFlow_file <<
"LOOKUP_TABLE default" << endl;
10992 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10993 for (iStation = 0; iStation < nStation; iStation++) {
10994 SurfFlow_file << ProbeArray[iAngle][iStation][7] <<
" ";
10998 SurfFlow_file <<
"VECTORS Velocity float" << endl;
11000 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11001 for (iStation = 0; iStation < nStation; iStation++) {
11002 SurfFlow_file << ProbeArray[iAngle][iStation][8] <<
" " << ProbeArray[iAngle][iStation][9] <<
" " << ProbeArray[iAngle][iStation][10] <<
" ";
11009 SurfFlow_file <<
"ZONE T= \"" << Analyze_TagBound <<
"\", NODES=" << nAngle*nStation <<
" , ELEMENTS= " << nAngle*(nStation-1) <<
", DATAPACKING=POINT, ZONETYPE=FEQUADRILATERAL" << endl;
11011 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11012 for (iStation = 0; iStation < nStation; iStation++) {
11014 Alpha = atan(ProbeArray[iAngle][iStation][10]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
11015 Beta = atan(ProbeArray[iAngle][iStation][9]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
11017 Mach_ij = ProbeArray[iAngle][iStation][7];
11018 if (iAngle+1 != nAngle) Mach_ip1j = ProbeArray[iAngle+1][iStation][7];
11019 else Mach_ip1j = ProbeArray[0][iStation][7];
11020 if (iAngle-1 != -1) Mach_im1j = ProbeArray[iAngle-1][iStation][7];
11021 else Mach_im1j = ProbeArray[nAngle-1][iStation][7];
11022 if (iStation+1 != nStation) Mach_ijp1 = ProbeArray[iAngle][iStation+1][7];
11023 else Mach_ijp1 = ProbeArray[iAngle][0][7];
11024 if (iStation-1 != -1) Mach_ijm1 = ProbeArray[iAngle][iStation-1][7];
11025 else Mach_ijm1 = ProbeArray[iAngle][nStation-1][7];
11026 Filtered_Mach = (4.0*Mach_ij+Mach_ip1j+Mach_im1j+Mach_ijp1+Mach_ijm1)/8.0;
11028 Alpha_ij = atan(ProbeArray[iAngle][iStation][10]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
11029 if (iAngle+1 != nAngle) Alpha_ip1j = atan(ProbeArray[iAngle+1][iStation][10]/ProbeArray[iAngle+1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11030 else Alpha_ip1j = atan(ProbeArray[0][iStation][10]/ProbeArray[0][iStation][8])*360.0/(2.0*
PI_NUMBER);
11031 if (iAngle-1 != -1) Alpha_im1j = atan(ProbeArray[iAngle-1][iStation][10]/ProbeArray[iAngle-1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11032 else Alpha_im1j = atan(ProbeArray[nAngle-1][iStation][10]/ProbeArray[nAngle-1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11033 if (iStation+1 != nStation) Alpha_ijp1 = atan(ProbeArray[iAngle][iStation+1][10]/ProbeArray[iAngle][iStation+1][8])*360.0/(2.0*
PI_NUMBER);
11034 else Alpha_ijp1 = atan(ProbeArray[iAngle][0][10]/ProbeArray[iAngle][0][8])*360.0/(2.0*
PI_NUMBER);
11035 if (iStation-1 != -1) Alpha_ijm1 = atan(ProbeArray[iAngle][iStation-1][10]/ProbeArray[iAngle][iStation-1][8])*360.0/(2.0*
PI_NUMBER);
11036 else Alpha_ijm1 = atan(ProbeArray[iAngle][nStation-1][10]/ProbeArray[iAngle][nStation-1][8])*360.0/(2.0*
PI_NUMBER);
11037 Filtered_Alpha = (4.0*Alpha_ij+Alpha_ip1j+Alpha_im1j+Alpha_ijp1+Alpha_ijm1)/8.0;
11039 Beta_ij = atan(ProbeArray[iAngle][iStation][9]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
11040 if (iAngle+1 != nAngle) Beta_ip1j = atan(ProbeArray[iAngle+1][iStation][9]/ProbeArray[iAngle+1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11041 else Beta_ip1j = atan(ProbeArray[0][iStation][9]/ProbeArray[0][iStation][8])*360.0/(2.0*
PI_NUMBER);
11042 if (iAngle-1 != -1) Beta_im1j = atan(ProbeArray[iAngle-1][iStation][9]/ProbeArray[iAngle-1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11043 else Beta_im1j = atan(ProbeArray[nAngle-1][iStation][9]/ProbeArray[nAngle-1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11044 if (iStation+1 != nStation) Beta_ijp1 = atan(ProbeArray[iAngle][iStation+1][9]/ProbeArray[iAngle][iStation+1][8])*360.0/(2.0*
PI_NUMBER);
11045 else Beta_ijp1 = atan(ProbeArray[iAngle][0][9]/ProbeArray[iAngle][0][8])*360.0/(2.0*
PI_NUMBER);
11046 if (iStation-1 != -1) Beta_ijm1 = atan(ProbeArray[iAngle][iStation-1][9]/ProbeArray[iAngle][iStation-1][8])*360.0/(2.0*
PI_NUMBER);
11047 else Beta_ijm1 = atan(ProbeArray[iAngle][nStation-1][9]/ProbeArray[iAngle][nStation-1][8])*360.0/(2.0*
PI_NUMBER);
11048 Filtered_Beta = (4.0*Beta_ij+Beta_ip1j+Beta_im1j+Beta_ijp1+Beta_ijm1)/8.0;
11052 <<
" " << ProbeArray[iAngle][iStation][1]-yCoord_CG
11053 <<
" " << ProbeArray[iAngle][iStation][2]-zCoord_CG
11054 <<
" " << ProbeArray[iAngle][iStation][3] <<
" " << ProbeArray[iAngle][iStation][4]
11055 <<
" " << ProbeArray[iAngle][iStation][5] <<
" " << ProbeArray[iAngle][iStation][6]
11056 <<
" " << ProbeArray[iAngle][iStation][8] <<
" " << ProbeArray[iAngle][iStation][9]
11057 <<
" " << ProbeArray[iAngle][iStation][10]
11058 <<
" " << Alpha <<
" " << Beta <<
" " << ProbeArray[iAngle][iStation][7]
11059 <<
" " << Filtered_Alpha <<
" " << Filtered_Beta <<
" " << Filtered_Mach << endl;
11064 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11065 for (iStation = 0; iStation < nStation-1; iStation++) {
11066 a = iAngle*nStation+iStation; b = a + nStation; c = b+1; d = a +1;
11067 if (iAngle == nAngle-1) { b = iStation; c = b+1; }
11068 SurfFlow_file << a+1 <<
" "<< b+1 <<
" "<< c+1 <<
" "<< d+1 << endl;
11074 SurfFlow_file <<
"TEXT X=14, Y=86, F=HELV-BOLD, C=BLUE, H=2.0, ";
11077 SurfFlow_file <<
"T=\"Rack Size: " << RackProbes <<
" probes at "<< RackAngle <<
"deg." <<
"\\" <<
"\\n";
11078 SurfFlow_file <<
"Mach " << config->
GetMach() <<
", Reynolds " << config->
GetReynolds() <<
", <greek>a</greek> " 11079 << config->
GetAoA() <<
"deg, <greek>b</greek> " << config->
GetAoS() <<
"deg." <<
"\\" <<
"\\n";
11080 SurfFlow_file.precision(1);
11082 SurfFlow_file.precision(4);
11083 SurfFlow_file <<
", MassFlow " << config->
GetSurface_MassFlow(iMarker_Analyze) <<
",\\" <<
"\\n";
11085 SurfFlow_file <<
"DC60 " << config->
GetSurface_DC60(iMarker_Analyze) <<
".\"" << endl;
11093 delete [] Buffer_Recv_Coord_x;
11094 delete [] Buffer_Recv_Coord_y;
11095 if (nDim == 3)
delete [] Buffer_Recv_Coord_z;
11097 delete [] Buffer_Recv_PT;
11098 delete [] Buffer_Recv_TT;
11099 delete [] Buffer_Recv_P;
11100 delete [] Buffer_Recv_T;
11101 delete [] Buffer_Recv_Mach;
11102 delete [] Buffer_Recv_Vel_x;
11103 delete [] Buffer_Recv_Vel_y;
11104 if (nDim == 3)
delete [] Buffer_Recv_Vel_z;
11105 delete [] Buffer_Recv_q;
11107 delete [] Buffer_Recv_Area;
11109 delete [] Buffer_Recv_nVertex;
11112 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11113 for (iStation = 0; iStation < nStation; iStation++) {
11114 delete[] ProbeArray[iAngle][iStation];
11117 delete[] ProbeArray;
11135 delete [] Buffer_Send_Coord_x;
11136 delete [] Buffer_Send_Coord_y;
11137 if (nDim == 3)
delete [] Buffer_Send_Coord_z;
11139 delete [] Buffer_Send_PT;
11140 delete [] Buffer_Send_TT;
11141 delete [] Buffer_Send_P;
11142 delete [] Buffer_Send_T;
11143 delete [] Buffer_Send_Mach;
11144 delete [] Buffer_Send_Vel_x;
11145 delete [] Buffer_Send_Vel_y;
11146 if (nDim == 3)
delete [] Buffer_Send_Vel_z;
11147 delete [] Buffer_Send_q;
11149 delete [] Buffer_Send_Area;
11156 SurfFlow_file.close();
11163 unsigned short ZONE_FLOW,
unsigned short ZONE_STRUCT,
bool header) {
11174 char cstr[200], buffer[50], turb_resid[1000];
11175 string Monitoring_Tag, monitoring_coeff, aeroelastic_coeff, turbo_coeff;
11180 unsigned short direct_diff = config[ZONE_FLOW]->
GetDirectDiff();
11186 if (config[ZONE_FLOW]->GetTime_Domain() && config[ZONE_FLOW]->GetRestart()) {
11193 strcat(cstr, buffer);
11196 if ((config[ZONE_FLOW]->GetTabular_FileFormat() ==
TAB_TECPLOT))
SPRINTF (buffer,
".dat");
11197 else if ((config[ZONE_FLOW]->GetTabular_FileFormat() ==
TAB_CSV))
SPRINTF (buffer,
".vtk");
11198 strcat(cstr, buffer);
11200 FSIHist_file->open(cstr, ios::out);
11201 FSIHist_file->precision(15);
11205 char begin[]=
"\"ExtIter\",\"BGSIter\"";
11209 char flow_coeff[]=
",\"CL\",\"CD\",\"CMx\",\"CMy\",\"CMz\",\"CL/CD\"";
11210 char fem_coeff[]=
",\"VM_Stress\"";
11211 char of_1[] =
",\"TgtGeom\"";
11212 char of_2[] =
",\"TgtNode\"";
11214 char d_flow_coeff[] =
",\"D(CL)\",\"D(CD)\",\"D(CSF)\",\"D(CMx)\",\"D(CMy)\",\"D(CMz)\",\"D(CFx)\",\"D(CFy)\",\"D(CFz)\",\"D(CL/CD)\",\"D(Custom_ObjFunc)\"";
11218 char fsi_resid[]=
",\"Res_FSI\",\"RelaxCoeff\",\"ForceCoeff\"";
11220 char flow_resid[]=
",\"Res_BGS[F0]\",\"Res_BGS[F1]\",\"Res_BGS[F2]\",\"Res_BGS[F3]\",\"Res_BGS[F4]\"";
11221 char adj_flow_resid[]=
",\"Res_AdjFlow[0]\",\"Res_AdjFlow[1]\",\"Res_AdjFlow[2]\",\"Res_AdjFlow[3]\",\"Res_AdjFlow[4]\"";
11222 char fem_resid[]=
",\"Res_BGS[S0]\",\"Res_BGS[S1]\",\"Res_BGS[S2]\"";
11226 char end[]=
",\"Time(min)\"\n";
11228 if ((config[ZONE_FLOW]->GetTabular_FileFormat() ==
TECPLOT) ||
11229 (config[ZONE_FLOW]->GetTabular_FileFormat() ==
TECPLOT_BINARY)) {
11230 FSIHist_file[0] <<
"TITLE = \"SU2 FSI Simulation\"" << endl;
11231 FSIHist_file[0] <<
"VARIABLES = ";
11236 FSIHist_file[0] << begin;
11238 FSIHist_file[0] << fsi_resid;
11240 switch (config[ZONE_FLOW]->GetKind_Solver()) {
11246 FSIHist_file[0] << flow_resid;
11247 if (turbulent) FSIHist_file[0] << turb_resid;
11252 FSIHist_file[0] << adj_flow_resid;
11259 switch (config[ZONE_STRUCT]->GetKind_Solver()) {
11262 FSIHist_file[0] << fem_resid;
11266 FSIHist_file[0] << fem_resid ;
11272 switch (config[ZONE_FLOW]->GetKind_Solver()) {
11276 FSIHist_file[0] << flow_coeff;
11277 if (turbulent) FSIHist_file[0] << turb_resid;
11279 FSIHist_file[0] << d_flow_coeff;
11285 FSIHist_file[0] << adj_flow_resid;
11290 switch (config[ZONE_STRUCT]->GetKind_Solver()) {
11293 FSIHist_file[0] << fem_coeff;
11297 FSIHist_file[0] << fem_coeff;
11302 switch (config[ZONE_STRUCT]->GetKind_ObjFunc()){
11304 FSIHist_file[0] << of_1;
11307 FSIHist_file[0] << of_2;
11313 FSIHist_file[0] << end;
11322 unsigned long iExtIter = config[ZONE_STRUCT]->
GetInnerIter();
11324 unsigned long iOuterIter = config[ZONE_STRUCT]->
GetOuterIter();
11327 bool first_iter = ((iExtIter==0) && (iOuterIter == 0));
11335 (config[ZONE_STRUCT]->GetKind_Solver() ==
DISC_ADJ_FEM));
11346 char begin[1000], direct_coeff[1000],
11347 fsi_resid[1000], fsi_coeffs[1000],
11348 flow_resid[1000], fem_resid[1000],
11349 objective_function[1000], end[1000];
11357 unsigned short nVar_FSI = 1, nCoeff_FSI = 2, nVar_Flow = 0, nVar_FEM = 0;
11359 unsigned short iVar;
11362 if (compressible) nVar_Flow = nDim+2;
else nVar_Flow = nDim+1;
11365 if (linear_analysis) nVar_FEM = nDim;
11366 if (nonlinear_analysis) nVar_FEM = 3;
11367 if (disc_adj_fem) nVar_FEM = nDim;
11370 residual_flow =
new su2double[nVar_Flow];
11371 residual_fem =
new su2double[nVar_FEM];
11372 residual_fsi =
new su2double[nVar_FSI];
11373 coeffs_fsi =
new su2double[nCoeff_FSI];
11377 su2double Total_CL = 0.0, Total_CD = 0.0, Total_CMx = 0.0, Total_CMy = 0.0, Total_CMz = 0.0, Total_CEff = 0.0,
11387 bool print_of =
false;
11389 switch (config[ZONE_STRUCT]->GetKind_ObjFunc()){
11402 if ((!disc_adj_flow) && (!disc_adj_fem)){
11404 for (iVar = 0; iVar < nVar_Flow; iVar++)
11405 residual_flow[iVar] = solver_container[ZONE_FLOW][
INST_0][
MESH_0][
FLOW_SOL]->GetRes_BGS(iVar);
11408 for (iVar = 0; iVar < nVar_FEM; iVar++)
11409 residual_fem[iVar] = solver_container[ZONE_STRUCT][
INST_0][
MESH_0][
FEA_SOL]->GetRes_BGS(iVar);
11418 for (iVar = 0; iVar < nVar_Flow; iVar++)
11421 for (iVar = 0; iVar < nVar_FEM; iVar++)
11430 SPRINTF (fsi_resid,
", %14.8e", log10 (residual_fsi[0]));
11431 SPRINTF (fsi_coeffs,
", %14.8e, %14.8e", coeffs_fsi[0], coeffs_fsi[1]);
11435 if (compressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), dummy);
11436 if (incompressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), dummy, dummy);
11439 if (compressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), log10 (residual_flow[4]) );
11440 if (incompressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), dummy);
11444 if (nDim == 2)
SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), dummy);
11445 else SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), log10 (residual_fem[1]));
11448 SPRINTF (direct_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",Total_CL, Total_CD, Total_CMx, Total_CMy, Total_CMz, Total_CEff);
11450 if (print_of)
SPRINTF (objective_function,
", %14.8e", Total_OF);
11453 if (!print_of) FSIHist_file[0] << begin << fsi_resid << fsi_coeffs << flow_resid << fem_resid << direct_coeff << end;
11454 else FSIHist_file[0] << begin << fsi_resid << fsi_coeffs << flow_resid << fem_resid << direct_coeff << objective_function << end;
11455 FSIHist_file[0].flush();
11458 delete [] residual_flow;
11459 delete [] residual_fem;
11460 delete [] residual_fsi;
11461 delete [] coeffs_fsi;
11470 unsigned short iMarker,iDim, nDim, iVar, nMarker, nVar;
11471 unsigned long iVertex, iPoint, nPoint, nVertex;
11472 su2double *Normal, Prod, Sens = 0.0, SensDim, Area;
11474 unsigned short iZone;
11477 for (iZone = 0; iZone < val_nZone; iZone++) {
11478 solver[iZone] =
new CSolver*[1];
11481 for (iZone = 0; iZone < val_nZone; iZone++) {
11490 vector<string> fieldnames;
11491 fieldnames.push_back(
"\"Point\"");
11492 fieldnames.push_back(
"\"x\"");
11493 fieldnames.push_back(
"\"y\"");
11495 fieldnames.push_back(
"\"z\"");
11497 fieldnames.push_back(
"\"Sensitivity_x\"");
11498 fieldnames.push_back(
"\"Sensitivity_y\"");
11500 fieldnames.push_back(
"\"Sensitivity_z\"");
11502 fieldnames.push_back(
"\"Surface_Sensitivity\"");
11506 for (iPoint = 0; iPoint < nPoint; iPoint++) {
11507 for (iDim = 0; iDim < nDim; iDim++) {
11510 for (iVar = 0; iVar < nDim; iVar++) {
11511 solver[iZone][
INST_0]->
GetNodes()->
SetSolution(iPoint, iVar+nDim, geometry[iZone][INST_0]->GetSensitivity(iPoint, iVar));
11517 for (iMarker = 0; iMarker < nMarker; iMarker++) {
11519 if((config[iZone]->GetMarker_All_KindBC(iMarker) ==
HEAT_FLUX ) ||
11520 (config[iZone]->GetMarker_All_KindBC(iMarker) ==
EULER_WALL ) ||
11521 (config[iZone]->GetMarker_All_KindBC(iMarker) ==
ISOTHERMAL ) ||
11527 for (iVertex = 0; iVertex < nVertex; iVertex++) {
11532 for (iDim = 0; iDim < nDim; iDim++) {
11540 Prod += Normal[iDim]*SensDim;
11542 Area += Normal[iDim]*Normal[iDim];
11562 for (iZone = 0; iZone < val_nZone; iZone++) {
11563 delete solver[iZone][0];
11564 delete solver[iZone];
11571 unsigned short iMarker_Monitoring;
11572 string inMarker_Tag, outMarker_Tag, inMarkerTag_Mix;
11573 unsigned short nZone = config->
GetnZone();
11577 unsigned short nBladesRow, nStages;
11578 unsigned short iStage;
11582 cout << endl <<
"------------------------- Turbomachinery Summary ------------------------" << endl;
11585 cout << endl <<
"----------------------------- Blade " << iMarker_Monitoring + 1 <<
" -----------------------------------" << endl;
11588 if(iMarker_Monitoring == 0){
11589 cout <<
"BC Inlet convergence monitoring marker " << inMarker_Tag <<
" : "<<endl;
11591 cout <<
" Inlet Total Enthalpy" <<
" Inlet Total Enthalpy BC" <<
" err(%)" << endl;
11594 cout.width(25); cout << abs((TotalEnthalpyIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - TotalEnthalpyIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/TotalEnthalpyIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11597 cout <<
" Inlet Entropy" <<
" Inlet Entropy BC" <<
" err(%)" << endl;
11600 cout.width(25); cout << abs((EntropyIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - EntropyIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/EntropyIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11603 cout <<
" Inlet Absolute Angle" <<
" Inlet Absolute Angle BC" <<
" err(%)" << endl;
11604 cout.width(25); cout << 180.0/
PI_NUMBER*AbsFlowAngleIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11605 cout.width(25); cout << 180.0/
PI_NUMBER*FlowAngleIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11606 cout.width(25); cout << abs((AbsFlowAngleIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - FlowAngleIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/FlowAngleIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11611 cout <<
" Inlet TurbIntensity" <<
" Inlet TurbIntensity BC" <<
" err(%)" << endl;
11612 cout.width(25); cout << TurbIntensityIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11617 cout <<
" Inlet Turb2LamRatio" <<
" Inlet Turb2LamRatio BC" <<
" err(%)" << endl;
11618 cout.width(25); cout << Turb2LamViscRatioIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11625 cout <<
" Inlet Nu Factor" <<
" Inlet Nu Factor BC" <<
" err(%)" << endl;
11626 cout.width(25); cout << NuFactorIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11636 cout <<
"BC outlet convergence monitoring marker " << outMarker_Tag <<
" : "<<endl;
11638 cout <<
" Outlet Pressure" <<
" Outlet Pressure BC" <<
" err(%)" << endl;
11641 cout.width(25); cout << abs((PressureOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - PressureOut_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/PressureOut_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11646 cout <<
"Convergence monitoring for integral quantities between markers " << inMarker_Tag <<
" and "<< outMarker_Tag <<
" : "<<endl;
11648 cout <<
" Inlet Mass Flow " <<
" Outlet Mass Flow" <<
" err(%)" << endl;
11651 cout.width(25); cout << abs((MassFlowIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - MassFlowOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/MassFlowIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11657 cout <<
" Inlet Total Rothalpy " <<
" Outlet Total Rothalpy" <<
" err(%)" << endl;
11660 cout.width(25); cout << abs((RothalpyIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - RothalpyOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/RothalpyIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11663 cout <<
"Blade performance between boundaries " << inMarker_Tag <<
" and "<< outMarker_Tag <<
" : "<<endl;
11665 cout <<
" Total Pressure Loss(%)" <<
" Kinetic Energy Loss(%)" <<
" Entropy Generation(%)" << endl;
11666 cout.width(25); cout << TotalPressureLoss[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)]*100.0;
11667 cout.width(25); cout << KineticEnergyLoss[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)]*100.0;
11668 cout.width(25); cout << EntropyGen[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)]*100.0;
11671 cout <<
" Total Inlet Enthalpy" <<
" Eulerian Work" <<
" Pressure Ratio" << endl;
11674 cout.width(25); cout << PressureRatio[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11677 cout <<
" Inlet Entropy" <<
" Outlet Entropy" <<
" Outlet Is. Enthalpy" << endl;
11683 cout <<
"Cinematic quantities between boundaries " << inMarker_Tag <<
" and "<< outMarker_Tag <<
" : "<<endl;
11685 cout <<
" Inlet Mach"<<
" Inlet Normal Mach" <<
" Inlet Tang. Mach" << endl;
11686 cout.width(25); cout << sqrt(MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0]*MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0] +MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1]*MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1]);
11687 cout.width(25); cout << MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0];
11688 cout.width(25); cout << MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1];
11691 cout <<
" Outlet Mach"<<
" Outlet Normal Mach" <<
" Outlet Tang. Mach" << endl;
11692 cout.width(25); cout << sqrt(MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0]*MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0] +MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1]*MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1]);
11693 cout.width(25); cout << MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0];
11694 cout.width(25); cout << MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1];cout << endl;
11696 cout <<
" Inlet Flow Angle" <<
" Outlet flow Angle " << endl;
11697 cout.width(25); cout << 180.0/
PI_NUMBER*FlowAngleIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11698 cout.width(25); cout << 180.0/
PI_NUMBER*FlowAngleOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11702 cout <<
" Inlet Abs Flow Angle" <<
" Outlet Abs Flow Angle " << endl;
11703 cout.width(25); cout << 180.0/
PI_NUMBER*AbsFlowAngleIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11704 cout.width(25); cout << 180.0/
PI_NUMBER*AbsFlowAngleOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11706 cout << endl <<
"-------------------------------------------------------------------------" << endl;
11708 if(nZone > 0 && iMarker_Monitoring < config->GetnMarker_Turbomachinery() -1){
11709 cout << endl <<
"---------- Mixing-Plane Interface between Blade " << iMarker_Monitoring + 1 <<
" and Blade " << iMarker_Monitoring + 2 <<
" -----------" << endl;
11712 cout <<
"Convergence monitoring for the outlet " << outMarker_Tag <<
" and the inlet "<< inMarkerTag_Mix <<
" : "<<endl;
11714 cout <<
" Outlet Density " <<
" Inlet Density" <<
" err(%)" << endl;
11717 cout.width(25); cout << abs((DensityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)] - DensityOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/DensityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)])*100.0;
11720 cout <<
" Outlet Pressure " <<
" Inlet Pressure" <<
" err(%)" << endl;
11723 cout.width(25); cout << abs((PressureIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)] - PressureOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/PressureIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)])*100.0;
11726 cout <<
" Outlet Normal Velocity " <<
" Inlet Normal Velocity" <<
" err(%)" << endl;
11729 cout.width(25); cout << abs((TurboVelocityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)][0] - TurboVelocityOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0])/TurboVelocityIn[iMarker_Monitoring+1][config->
GetnSpan_iZones(iMarker_Monitoring +1)][0])*100.0;
11732 cout <<
" Outlet Tang. Velocity " <<
" Inlet Tang. Velocity" <<
" err(%)" << endl;
11735 cout.width(25); cout << abs((TurboVelocityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)][1] - TurboVelocityOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1])/TurboVelocityIn[iMarker_Monitoring+1][config->
GetnSpan_iZones(iMarker_Monitoring +1)][1])*100.0;
11738 cout <<
" Outlet Entropy " <<
" Inlet Entropy" <<
" err(%)" << endl;
11741 cout.width(25); cout << abs((EntropyIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)] - EntropyOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/EntropyIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)])*100.0;
11746 cout <<
" Outlet TurbIntensity " <<
" Inlet TurbIntensity" <<
" err(%)" << endl;
11747 cout.width(25); cout << TurbIntensityOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11748 cout.width(25); cout << TurbIntensityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)];
11749 cout.width(25); cout << abs((TurbIntensityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)] - TurbIntensityOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/TurbIntensityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)])*100.0;
11752 cout <<
" Outlet Turb2LamRatio " <<
" Inlet Turb2LamRatio" <<
" err(%)" << endl;
11753 cout.width(25); cout << Turb2LamViscRatioOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11754 cout.width(25); cout << Turb2LamViscRatioIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)];
11755 cout.width(25); cout << abs((Turb2LamViscRatioIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)] - Turb2LamViscRatioOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/Turb2LamViscRatioIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)])*100.0;
11758 cout <<
" Outlet Nu Factor " <<
" Inlet Nu Factor" <<
" err(%)" << endl;
11759 cout.width(25); cout << NuFactorOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11760 cout.width(25); cout << NuFactorIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)];
11761 cout.width(25); cout << abs((NuFactorIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)] - NuFactorOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/NuFactorIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)])*100.0;
11765 cout << endl <<
"-------------------------------------------------------------------------" << endl;
11772 for(iStage = 0; iStage < nStages; iStage++ ){
11773 cout << endl <<
"----------------------------- Stage " << iStage + 1 <<
" -----------------------------------" << endl;
11776 cout <<
"Stage performance between boundaries " << inMarker_Tag <<
" and "<< outMarker_Tag <<
" : "<<endl;
11778 cout <<
" Total-Total Eff.(%)" <<
" Total-Static Eff.(%)" <<
" Entropy Generation(%)" << endl;
11779 cout.width(25); cout << TotalTotalEfficiency[nBladesRow + iStage][nSpanWiseSections]*100.0;
11780 cout.width(25); cout << TotalStaticEfficiency[nBladesRow + iStage][nSpanWiseSections]*100.0;
11781 cout.width(25); cout << EntropyGen[nBladesRow + iStage][nSpanWiseSections]*100.0;
11784 cout <<
" Pressure Ratio " <<
" Outlet Is. Enthalpy" <<
" In-Out MassFlow Diff (%)" << endl;
11785 cout.width(25); cout << PressureRatio[nBladesRow + iStage][nSpanWiseSections];
11786 cout.width(25); cout << EnthalpyOutIs[nBladesRow + iStage][nSpanWiseSections]*config->
GetEnergy_Ref();
11787 cout.width(25); cout << abs((MassFlowIn[nBladesRow + iStage][nSpanWiseSections] - MassFlowOut[nBladesRow + iStage][nSpanWiseSections])/MassFlowIn[nBladesRow + iStage][nSpanWiseSections])*100.0;
11790 cout << endl <<
"-------------------------------------------------------------------------" << endl;
11795 cout << endl <<
"---------------------------- Turbine ------------------------------------" << endl;
11798 cout <<
"Turbine performance between boundaries " << inMarker_Tag <<
" and "<< outMarker_Tag <<
" : "<<endl;
11800 cout <<
" Total-Total Eff.(%)" <<
" Total-Static Eff.(%)" <<
" Entropy Generation(%)" << endl;
11801 cout.width(25); cout << TotalTotalEfficiency[nBladesRow + nStages][nSpanWiseSections]*100.0;
11802 cout.width(25); cout << TotalStaticEfficiency[nBladesRow + nStages][nSpanWiseSections]*100.0;
11803 cout.width(25); cout << EntropyGen[nBladesRow + nStages][nSpanWiseSections]*100.0;
11806 cout <<
" Pressure Ratio " <<
" Outlet Is. Enthalpy" <<
" In-Out MassFlow Diff (%)" << endl;
11807 cout.width(25); cout << PressureRatio[nBladesRow + nStages][nSpanWiseSections];
11808 cout.width(25); cout << EnthalpyOutIs[nBladesRow + nStages][nSpanWiseSections]*config->
GetEnergy_Ref();;
11809 cout.width(25); cout << abs((MassFlowIn[nBladesRow + nStages][nSpanWiseSections] - MassFlowOut[nBladesRow + nStages][nSpanWiseSections])/MassFlowIn[nBladesRow + nStages][nSpanWiseSections])*100.0;
11811 cout << endl <<
"-------------------------------------------------------------------------" << endl;
11818 unsigned short val_iZone,
bool output) {
11820 string inMarker_Tag, outMarker_Tag, inMarkerTag_Mix;
11821 unsigned short nZone = config[val_iZone]->
GetnZone();
11823 unsigned short iDim, iSpan;
11825 unsigned long iExtIter = config[val_iZone]->
GetInnerIter();
11826 su2double* SpanWiseValuesIn, *SpanWiseValuesOut;
11828 string spanwise_performance_filename;
11839 spanwise_performance_filename =
"TURBOMACHINERY/inflow_spanwise_thermodynamic_values.dat";
11842 unsigned short lastindex = spanwise_performance_filename.find_last_of(
".");
11843 spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
11845 spanwise_performance_filename.append(
string(buffer));
11849 myfile.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
11850 myfile.setf(ios::scientific);
11851 myfile.precision(12);
11853 myfile <<
"TITLE = \"Inflow Spanwise Thermodynamic Values. iExtIter = " << iExtIter <<
" \"" << endl;
11854 myfile <<
"VARIABLES =" << endl;
11856 myfile.width(30); myfile <<
"\"SpanWise Value[m]\"";
11857 myfile.width(15); myfile <<
"\"iSpan\"";
11858 myfile.width(30); myfile <<
"\"Pressure[Pa]\"";
11859 myfile.width(30); myfile <<
"\"TotalPressure[Pa]\"";
11860 myfile.width(30); myfile <<
"\"Temperature[K]\"";
11861 myfile.width(30); myfile <<
"\"TotalTemperature[K]\"";
11862 myfile.width(30); myfile <<
"\"Enthalpy[J]\"";
11863 myfile.width(30); myfile <<
"\"TotalEnthalpy[J]\"";
11864 myfile.width(30); myfile <<
"\"Density[kg/m3]\"";
11865 myfile.width(30); myfile <<
"\"Entropy[J/K]\"";
11866 myfile.width(30); myfile <<
"\"TurbIntensity[-]\"";
11867 myfile.width(30); myfile <<
"\"Turb2LamViscRatio[-]\"";
11868 myfile.width(30); myfile <<
"\"NuFactor[-]\"";
11873 myfile.width(30); myfile << SpanWiseValuesIn[iSpan];
11874 myfile.width(15); myfile << iSpan;
11879 myfile.width(30); myfile << EnthalpyIn [val_iZone][iSpan]*config[
ZONE_0]->
GetEnergy_Ref();
11880 myfile.width(30); myfile << TotalEnthalpyIn [val_iZone][iSpan]*config[
ZONE_0]->
GetEnergy_Ref();
11883 if(TurbIntensityIn[val_iZone][iSpan] > 1.0){
11884 myfile.width(30); myfile << TurbIntensityIn [val_iZone][config[
ZONE_0]->
GetnSpan_iZones(val_iZone)/2];
11886 myfile.width(30); myfile << TurbIntensityIn [val_iZone][iSpan];
11888 myfile.width(30); myfile << Turb2LamViscRatioIn [val_iZone][iSpan];
11889 myfile.width(30); myfile << NuFactorIn [val_iZone][iSpan];
11896 spanwise_performance_filename =
"TURBOMACHINERY/outflow_spanwise_thermodynamic_values.dat";
11898 unsigned short lastindex = spanwise_performance_filename.find_last_of(
".");
11899 spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
11901 spanwise_performance_filename.append(
string(buffer));
11904 myfile.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
11905 myfile.setf(ios::scientific);
11906 myfile.precision(12);
11908 myfile <<
"TITLE = \"Outflow Span-wise Thermodynamic Values. iExtIter = " << iExtIter <<
" \"" << endl;
11909 myfile <<
"VARIABLES =" << endl;
11911 myfile.width(30); myfile <<
"\"SpanWise Value[m]\"";
11912 myfile.width(15); myfile <<
"\"iSpan\"";
11913 myfile.width(30); myfile <<
"\"Pressure[Pa]\"";
11914 myfile.width(30); myfile <<
"\"TotalPressure[Pa]\"";
11915 myfile.width(30); myfile <<
"\"Temperature[K]\"";
11916 myfile.width(30); myfile <<
"\"TotalTemperature[K]\"";
11917 myfile.width(30); myfile <<
"\"Enthalpy[J]\"";
11918 myfile.width(30); myfile <<
"\"TotalEnthalpy[J]\"";
11919 myfile.width(30); myfile <<
"\"Density[kg/m3]\"";
11920 myfile.width(30); myfile <<
"\"Entropy[J/K]\"";
11921 myfile.width(30); myfile <<
"\"TurbIntensity[-]\"";
11922 myfile.width(30); myfile <<
"\"Turb2LamViscRatio[-]\"";
11923 myfile.width(30); myfile <<
"\"NuFactor[-]\"";
11929 myfile.width(30); myfile << SpanWiseValuesOut[iSpan];
11930 myfile.width(15); myfile << iSpan;
11935 myfile.width(30); myfile << EnthalpyOut [val_iZone][iSpan]*config[
ZONE_0]->
GetEnergy_Ref();
11936 myfile.width(30); myfile << TotalEnthalpyOut [val_iZone][iSpan]*config[
ZONE_0]->
GetEnergy_Ref();
11939 if(TurbIntensityOut[val_iZone][iSpan] > 1.0){
11940 myfile.width(30); myfile << TurbIntensityOut [val_iZone][config[
ZONE_0]->
GetnSpan_iZones(val_iZone)/2];
11942 myfile.width(30); myfile << TurbIntensityOut [val_iZone][iSpan];
11944 myfile.width(30); myfile << Turb2LamViscRatioOut [val_iZone][iSpan];
11945 myfile.width(30); myfile << NuFactorOut [val_iZone][iSpan];
11952 spanwise_performance_filename =
"TURBOMACHINERY/inflow_spanwise_kinematic_values.dat";
11954 unsigned short lastindex = spanwise_performance_filename.find_last_of(
".");
11955 spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
11957 spanwise_performance_filename.append(
string(buffer));
11960 myfile.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
11961 myfile.setf(ios::scientific);
11962 myfile.precision(12);
11964 myfile <<
"TITLE = \"Inflow Span-wise Kinematic Values. iExtIter = " << iExtIter <<
" \"" << endl;
11965 myfile <<
"VARIABLES =" << endl;
11967 myfile.width(30); myfile <<
"\"SpanWise Value[m]\"";
11968 myfile.width(15); myfile <<
"\"iSpan\"";
11969 myfile.width(30); myfile <<
"\"Normal Mach[-]\"";
11970 myfile.width(30); myfile <<
"\"Tangential Mach[-]\"";
11971 myfile.width(30); myfile <<
"\"3rd Component Mach[-]\"";
11972 myfile.width(30); myfile <<
"\"Mach Module[-]\"";
11973 myfile.width(30); myfile <<
"\"Normal Velocity[m/s]\"";
11974 myfile.width(30); myfile <<
"\"Tangential Velocity[m/s]\"";
11975 myfile.width(30); myfile <<
"\"3rd Component Velocity[m/s]\"";
11976 myfile.width(30); myfile <<
"\"Velocity Module[m/s]\"";
11977 myfile.width(30); myfile <<
"\"Absolute Flow Angle[deg]\"";
11978 myfile.width(30); myfile <<
"\"Relative Flow Angle[deg]\"";
11984 myfile.width(30); myfile << SpanWiseValuesIn[iSpan];
11985 myfile.width(15); myfile << iSpan;
11986 for (iDim = 0; iDim < 4; iDim++){
11987 myfile.width(30); myfile << MachIn [val_iZone][iSpan][iDim];
11989 for (iDim = 0; iDim < 4; iDim++){
11990 myfile.width(30); myfile << TurboVelocityIn [val_iZone][iSpan][iDim]*config[
ZONE_0]->
GetVelocity_Ref();
11992 if(AbsFlowAngleIn[val_iZone][iSpan] != AbsFlowAngleIn[val_iZone][iSpan]){
11993 myfile.width(30); myfile <<
"0.0000";
11996 myfile.width(30); myfile << AbsFlowAngleIn [val_iZone][iSpan]*180.0/
PI_NUMBER;
11998 if(FlowAngleIn[val_iZone][iSpan] != FlowAngleIn[val_iZone][iSpan]){
11999 myfile.width(30); myfile <<
"0.0000";
12002 myfile.width(30); myfile << FlowAngleIn [val_iZone][iSpan]*180.0/
PI_NUMBER;
12010 spanwise_performance_filename =
"TURBOMACHINERY/outflow_spanwise_kinematic_values.dat";
12012 unsigned short lastindex = spanwise_performance_filename.find_last_of(
".");
12013 spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
12015 spanwise_performance_filename.append(
string(buffer));
12018 myfile.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
12019 myfile.setf(ios::scientific);
12020 myfile.precision(12);
12022 myfile <<
"TITLE = \"Outflow Span-wise Kinematic Values. iExtIter = " << iExtIter <<
" \"" << endl;
12023 myfile <<
"VARIABLES =" << endl;
12025 myfile.width(30); myfile <<
"\"SpanWise Value[m]\"";
12026 myfile.width(15); myfile <<
"\"iSpan\"";
12027 myfile.width(30); myfile <<
"\"Normal Mach[-]\"";
12028 myfile.width(30); myfile <<
"\"Tangential Mach[-]\"";
12029 myfile.width(30); myfile <<
"\"3rd Component Mach[-]\"";
12030 myfile.width(30); myfile <<
"\"Mach Module[-]\"";
12031 myfile.width(30); myfile <<
"\"Normal Velocity[m/s]\"";
12032 myfile.width(30); myfile <<
"\"Tangential Velocity[m/s]\"";
12033 myfile.width(30); myfile <<
"\"3rd Component Velocity[m/s]\"";
12034 myfile.width(30); myfile <<
"\"Velocity Module[m/s]\"";
12035 myfile.width(30); myfile <<
"\"Absolute Flow Angle[deg]\"";
12036 myfile.width(30); myfile <<
"\"Relative Flow Angle[deg]\"";
12042 myfile.width(30); myfile << SpanWiseValuesOut[iSpan];
12043 myfile.width(15); myfile << iSpan;
12044 for (iDim = 0; iDim < 4; iDim++){
12045 myfile.width(30); myfile << MachOut [val_iZone][iSpan][iDim];
12047 for (iDim = 0; iDim < 4; iDim++){
12048 myfile.width(30); myfile << TurboVelocityOut [val_iZone][iSpan][iDim]*config[
ZONE_0]->
GetVelocity_Ref();
12050 if(AbsFlowAngleOut[val_iZone][iSpan] != AbsFlowAngleOut[val_iZone][iSpan]){
12051 myfile.width(30); myfile <<
"0.0000";
12054 myfile.width(30); myfile << AbsFlowAngleOut [val_iZone][iSpan]*180.0/
PI_NUMBER;
12056 if(FlowAngleOut[val_iZone][iSpan] != FlowAngleOut[val_iZone][iSpan]){
12057 myfile.width(30); myfile <<
"0.0000";
12060 myfile.width(30); myfile << FlowAngleOut [val_iZone][iSpan]*180.0/
PI_NUMBER;
12073 ofstream HB_output_file;
12074 ofstream mean_HB_file;
12077 su2double *sbuf_var = NULL, *rbuf_var = NULL;
12080 unsigned short iVar, kInst;
12081 unsigned short nVar_output = 5;
12088 for (iVar = 0; iVar < nVar_output; iVar++)
12089 averages[iVar] = 0;
12095 HB_output_file.precision(15);
12096 HB_output_file.open(
"HB_output.csv", ios::out);
12097 HB_output_file <<
"\"time_instance\",\"CL\",\"CD\",\"CMx\",\"CMy\",\"CMz\"" << endl;
12099 mean_HB_file.precision(15);
12100 if (current_iter == 0 && iInst == 1) {
12101 mean_HB_file.open(
"history_HB.plt", ios::trunc);
12102 mean_HB_file <<
"TITLE = \"SU2 HARMONIC BALANCE SIMULATION\"" << endl;
12103 mean_HB_file <<
"VARIABLES = \"Iteration\",\"CL\",\"CD\",\"CMx\",\"CMy\",\"CMz\",\"CT\",\"CQ\",\"CMerit\"" << endl;
12104 mean_HB_file <<
"ZONE T= \"Average Convergence History\"" << endl;
12107 mean_HB_file.open(
"history_HB.plt", ios::out | ios::app);
12115 for (kInst = 0; kInst < val_nInst; kInst++) {
12124 for (iVar = 0; iVar < nVar_output; iVar++) {
12125 rbuf_var[iVar] = sbuf_var[iVar];
12128 HB_output_file << kInst <<
", ";
12129 for (iVar = 0; iVar < nVar_output; iVar++)
12130 HB_output_file << rbuf_var[iVar] <<
", ";
12131 HB_output_file << endl;
12134 for (iVar = 0; iVar < nVar_output; iVar++) {
12135 averages[iVar] += (1.0/
su2double(val_nInst))*rbuf_var[iVar];
12142 mean_HB_file << current_iter <<
", ";
12143 for (iVar = 0; iVar < nVar_output; iVar++) {
12144 mean_HB_file << averages[iVar];
12145 if (iVar < nVar_output-1)
12146 mean_HB_file <<
", ";
12148 mean_HB_file << endl;
12152 HB_output_file.close();
12153 mean_HB_file.close();
12154 delete [] rbuf_var;
12157 delete [] sbuf_var;
12158 delete [] averages;
12164 unsigned long iExtIter,
12165 unsigned short val_nZone) {
12167 bool special_output =
false;
12168 unsigned short iZone;
12170 for (iZone = 0; iZone < val_nZone; iZone++){
12175 if (config[iZone]->GetWrt_ForcesBreakdown())
12185 unsigned long iExtIter,
12186 unsigned short val_nZone) {
12188 unsigned short iZone, iVar, iInst;
12189 unsigned long iPoint;
12190 unsigned short nInst = 1;
12191 bool compressible =
true;
12193 for (iZone = 0; iZone < val_nZone; iZone++) {
12197 bool fem_solver = ((KindSolver ==
FEM_EULER) ||
12207 for (iInst = 0; iInst < nInst; iInst++){
12244 if (
rank ==
MASTER_NODE) cout << endl <<
"Writing comma-separated values (CSV) surface files." << endl;
12246 switch (config[iZone]->GetKind_Solver()) {
12250 solver_container[iZone][iInst][MESH_0][
FLOW_SOL], iExtIter, iZone, iInst);
12256 solver_container[iZone][iInst][MESH_0][
ADJFLOW_SOL],
12257 solver_container[iZone][iInst][MESH_0][FLOW_SOL], iExtIter, iZone, iInst);
12267 cout <<
"Loading solution output data locally on each rank." << endl;
12269 switch (config[iZone]->GetKind_Solver()) {
12273 LoadLocalData_Flow(config[iZone], geometry[iZone][iInst][MESH_0], solver_container[iZone][iInst][MESH_0], iZone);
12275 LoadLocalData_IncFlow(config[iZone], geometry[iZone][iInst][MESH_0], solver_container[iZone][iInst][MESH_0], iZone);
12280 LoadLocalData_AdjFlow(config[iZone], geometry[iZone][iInst][MESH_0], solver_container[iZone][iInst][MESH_0], iZone);
12283 LoadLocalData_Elasticity(config[iZone], geometry[iZone][iInst][MESH_0], solver_container[iZone][iInst][MESH_0], iZone);
12286 LoadLocalData_Base(config[iZone], geometry[iZone][iInst][MESH_0], solver_container[iZone][iInst][MESH_0], iZone);
12289 LoadLocalData_FEM(config[iZone], geometry[iZone][iInst][MESH_0], solver_container[iZone][iInst][MESH_0], iZone);
12295 if ((!cont_adj) && (!disc_adj) && (config[iZone]->GetFixed_CL_Mode()) &&
12296 (solver_container[iZone][iInst][MESH_0][
FLOW_SOL]->GetStart_AoA_FD()) &&
12297 iExtIter == solver_container[iZone][iInst][MESH_0][
FLOW_SOL]->GetIter_Update_AoA()) {
12301 cout <<
"Storing solution output data locally on each rank (cte. CL mode)." << endl;
12304 for (iPoint = 0; iPoint < geometry[iZone][iInst][
MESH_0]->GetnPoint(); iPoint++) {
12305 Local_Data_Copy[iPoint] =
new su2double[nVar_Par];
12308 for (iPoint = 0; iPoint < geometry[iZone][iInst][
MESH_0]->GetnPoint(); iPoint++) {
12309 for (iVar = 0; iVar < nVar_Par; iVar++) {
12310 Local_Data_Copy[iPoint][iVar] = Local_Data[iPoint][iVar];
12318 if ((!cont_adj) && (!disc_adj) && (config[iZone]->GetFixed_CL_Mode()) &&
12319 (solver_container[iZone][iInst][MESH_0][
FLOW_SOL]->GetEnd_AoA_FD()) &&
12321 (Local_Data_Copy != NULL)) {
12324 cout <<
"Recovering solution output data locally on each rank (cte. CL mode)." << endl;
12326 for (iPoint = 0; iPoint < geometry[iZone][iInst][
MESH_0]->
GetnPoint(); iPoint++) {
12327 for (iVar = 0; iVar < nVar_Par; iVar++) {
12328 Local_Data[iPoint][iVar] = Local_Data_Copy[iPoint][iVar];
12332 for (iPoint = 0; iPoint < geometry[iZone][iInst][
MESH_0]->
GetnPoint(); iPoint++)
12333 delete [] Local_Data_Copy[iPoint];
12334 delete [] Local_Data_Copy;
12341 if (
rank ==
MASTER_NODE) cout <<
"Sorting output data across all ranks." << endl;
12350 if (config[iZone]->GetWrt_Binary_Restart()) {
12351 if (
rank ==
MASTER_NODE) cout <<
"Writing binary SU2 native restart file." << endl;
12354 if (
rank ==
MASTER_NODE) cout <<
"Writing ASCII SU2 native restart file." << endl;
12355 WriteRestart_Parallel_ASCII(config[iZone], geometry[iZone][iInst][MESH_0], solver_container[iZone][iInst][MESH_0], iZone, iInst);
12360 if (config[iZone]->GetWrt_Slice()) {
12362 solver_container[iZone][iInst][MESH_0][
FLOW_SOL], iExtIter, iZone, 0);
12364 solver_container[iZone][iInst][MESH_0][FLOW_SOL], iExtIter, iZone, 1);
12372 if (Wrt_Vol || Wrt_Srf) {
12377 cout <<
"Preparing element connectivity across all ranks." << endl;
12395 switch (FileFormat) {
12401 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file volume solution file." << endl;
12412 if (
rank ==
MASTER_NODE) cout <<
"Tecplot binary volume files not available in serial with SU2_CFD." << endl;
12413 if (
rank ==
MASTER_NODE) cout <<
" Run SU2_SOL to generate Tecplot binary." << endl;
12414 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file volume solution file instead." << endl;
12425 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII volume solution file." << endl;
12434 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview binary volume solution file." << endl;
12447 switch (FileFormat) {
12453 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file surface solution file." << endl;
12462 if (
rank ==
MASTER_NODE) cout <<
"Tecplot binary surface files not available in serial with SU2_CFD." << endl;
12463 if (
rank ==
MASTER_NODE) cout <<
" Run SU2_SOL to generate Tecplot binary." << endl;
12464 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file surface solution file instead." << endl;
12473 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII surface solution file." << endl;
12482 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview binary surface solution file." << endl;
12511 Variable_Names.clear();
12519 unsigned short iDim;
12521 unsigned short nDim = geometry->
GetnDim();
12523 unsigned long iVar, jVar;
12524 unsigned long iPoint, jPoint, FirstIndex =
NONE, SecondIndex =
NONE, iMarker, iVertex;
12525 unsigned long nVar_First = 0, nVar_Second = 0, nVar_Consv_Par = 0;
12530 su2double Gas_Constant, Mach2Vel, Mach_Motion, RefDensity, RefPressure = 0.0, factor = 0.0;
12531 su2double *Aux_Frict_x = NULL, *Aux_Frict_y = NULL, *Aux_Frict_z = NULL, *Aux_Heat = NULL, *Aux_yPlus = NULL, *Aux_Buffet = NULL;
12533 su2double Q, Grad_Vel[3][3] = {{0.0, 0.0, 0.0},{0.0, 0.0, 0.0},{0.0, 0.0, 0.0}};
12538 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
12540 int *Local_Halo = NULL;
12542 stringstream varname;
12546 if (dynamic_grid) {
12550 RefVel2 = (Mach_Motion*Mach2Vel)*(Mach_Motion*Mach2Vel);
12554 for (iDim = 0; iDim < nDim; iDim++)
12559 factor = 1.0 / (0.5*RefDensity*RefArea*RefVel2);
12567 default: SecondIndex =
NONE;
break;
12570 nVar_First = solver[FirstIndex]->
GetnVar();
12571 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
12572 nVar_Consv_Par = nVar_First + nVar_Second;
12586 nVar_Par = 1; Variable_Names.push_back(
"x");
12587 nVar_Par += 1; Variable_Names.push_back(
"y");
12588 if (geometry->
GetnDim() == 3) {
12589 nVar_Par += 1; Variable_Names.push_back(
"z");
12595 nVar_Par += nVar_Consv_Par;
12597 Variable_Names.push_back(
"Density");
12598 Variable_Names.push_back(
"Momentum_x");
12599 Variable_Names.push_back(
"Momentum_y");
12600 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Momentum_z");
12601 Variable_Names.push_back(
"Energy");
12603 if (SecondIndex !=
NONE) {
12605 Variable_Names.push_back(
"TKE");
12606 Variable_Names.push_back(
"Omega");
12609 Variable_Names.push_back(
"Nu_Tilde");
12619 nVar_Par += nVar_Consv_Par;
12621 Variable_Names.push_back(
"Limiter_Density");
12622 Variable_Names.push_back(
"Limiter_Momentum_x");
12623 Variable_Names.push_back(
"Limiter_Momentum_y");
12624 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Limiter_Momentum_z");
12625 Variable_Names.push_back(
"Limiter_Energy");
12627 if (SecondIndex !=
NONE) {
12629 Variable_Names.push_back(
"Limiter_TKE");
12630 Variable_Names.push_back(
"Limiter_Omega");
12633 Variable_Names.push_back(
"Limiter_Nu_Tilde");
12641 nVar_Par += nVar_Consv_Par;
12643 Variable_Names.push_back(
"Residual_Density");
12644 Variable_Names.push_back(
"Residual_Momentum_x");
12645 Variable_Names.push_back(
"Residual_Momentum_y");
12646 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Residual_Momentum_z");
12647 Variable_Names.push_back(
"Residual_Energy");
12649 if (SecondIndex !=
NONE) {
12651 Variable_Names.push_back(
"Residual_TKE");
12652 Variable_Names.push_back(
"Residual_Omega");
12655 Variable_Names.push_back(
"Residual_Nu_Tilde");
12662 if (dynamic_grid) {
12663 if (geometry->
GetnDim() == 2) nVar_Par += 2;
12664 else if (geometry->
GetnDim() == 3) nVar_Par += 3;
12666 Variable_Names.push_back(
"Grid_Velocity_x");
12667 Variable_Names.push_back(
"Grid_Velocity_y");
12668 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Grid_Velocity_z");
12675 Variable_Names.push_back(
"Pressure");
12678 Variable_Names.push_back(
"Temperature");
12679 Variable_Names.push_back(
"Mach");
12683 Variable_Names.push_back(
"Pressure_Coefficient");
12685 Variable_Names.push_back(
"C<sub>p</sub>");
12692 nVar_Par += 1; Variable_Names.push_back(
"Laminar_Viscosity");
12694 Variable_Names.push_back(
"Skin_Friction_Coefficient_x");
12695 Variable_Names.push_back(
"Skin_Friction_Coefficient_y");
12696 if (geometry->
GetnDim() == 3) {
12697 nVar_Par += 1; Variable_Names.push_back(
"Skin_Friction_Coefficient_z");
12700 Variable_Names.push_back(
"Heat_Flux");
12702 nVar_Par += 1; Variable_Names.push_back(
"<greek>m</greek>");
12704 Variable_Names.push_back(
"C<sub>f</sub>_x");
12705 Variable_Names.push_back(
"C<sub>f</sub>_y");
12706 if (geometry->
GetnDim() == 3) {
12707 nVar_Par += 1; Variable_Names.push_back(
"C<sub>f</sub>_z");
12710 Variable_Names.push_back(
"Buffet_Sensor");
12714 Variable_Names.push_back(
"h");
12720 if (Kind_Solver ==
RANS) {
12723 Variable_Names.push_back(
"Y_Plus");
12724 Variable_Names.push_back(
"Eddy_Viscosity");
12726 Variable_Names.push_back(
"y<sup>+</sup>");
12727 Variable_Names.push_back(
"<greek>m</greek><sub>t</sub>");
12735 Variable_Names.push_back(
"Sharp_Edge_Dist");
12743 Variable_Names.push_back(
"gamma_BC");
12745 Variable_Names.push_back(
"<greek>g</greek><sub>BC</sub>");
12751 Variable_Names.push_back(
"DES_LengthScale");
12753 Variable_Names.push_back(
"Wall_Distance");
12758 Variable_Names.push_back(
"Roe_Dissipation");
12761 if (solver[
FLOW_SOL]->VerificationSolution) {
12762 if (solver[
FLOW_SOL]->VerificationSolution->ExactSolutionKnown()) {
12763 nVar_Par += 2*nVar_Consv_Par;
12764 Variable_Names.push_back(
"Verification_Density");
12765 Variable_Names.push_back(
"Verification_Momentum_x");
12766 Variable_Names.push_back(
"Verification_Momentum_y");
12767 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Verification_Momentum_z");
12768 Variable_Names.push_back(
"Verification_Energy");
12769 Variable_Names.push_back(
"Error_Density");
12770 Variable_Names.push_back(
"Error_Momentum_x");
12771 Variable_Names.push_back(
"Error_Momentum_y");
12772 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Error_Momentum_z");
12773 Variable_Names.push_back(
"Error_Energy");
12781 Variable_Names.push_back(
"Vorticity_x");
12782 Variable_Names.push_back(
"Vorticity_y");
12783 if (geometry->
GetnDim() == 3) {
12784 nVar_Par += 1; Variable_Names.push_back(
"Vorticity_z");
12787 if (geometry->
GetnDim() == 3) {
12789 Variable_Names.push_back(
"Q_Criterion");
12794 if (rotating_frame) {
12796 Variable_Names.push_back(
"Relative_Velocity_x");
12797 Variable_Names.push_back(
"Relative_Velocity_y");
12798 if (geometry->
GetnDim() == 3) {
12799 nVar_Par += 1; Variable_Names.push_back(
"Relative_Velocity_z");
12805 Variable_Names.push_back(
"Orthogonality");
12807 Variable_Names.push_back(
"Aspect_Ratio");
12809 Variable_Names.push_back(
"Volume_Ratio");
12829 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
12830 Aux_Frict_x[iPoint] = 0.0;
12831 Aux_Frict_y[iPoint] = 0.0;
12832 Aux_Frict_z[iPoint] = 0.0;
12833 Aux_Heat[iPoint] = 0.0;
12834 Aux_yPlus[iPoint] = 0.0;
12835 Aux_Buffet[iPoint] = 0.0;
12837 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
12839 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
12843 if (geometry->
GetnDim() == 3) Aux_Frict_z[iPoint] = solver[
FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 2);
12856 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
12857 Local_Data[iPoint] =
new su2double[nVar_Par];
12860 Local_Halo =
new int[geometry->
GetnPoint()];
12861 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
12869 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
12875 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
12879 if (isPeriodic) Local_Halo[iPoint] =
false;
12899 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
12903 if (!Local_Halo[iPoint] || Wrt_Halo) {
12911 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++) {
12912 Local_Data[jPoint][iVar] = geometry->
node[iPoint]->
GetCoord(iDim);
12914 Local_Data[jPoint][iVar] *= 12.0;
12920 for (jVar = 0; jVar < nVar_First; jVar++) {
12928 if (SecondIndex !=
NONE) {
12929 for (jVar = 0; jVar < nVar_Second; jVar++) {
12940 for (jVar = 0; jVar < nVar_First; jVar++) {
12945 if (SecondIndex !=
NONE) {
12946 for (jVar = 0; jVar < nVar_Second; jVar++) {
12956 for (jVar = 0; jVar < nVar_First; jVar++) {
12957 Local_Data[jPoint][iVar] = solver[FirstIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
12961 if (SecondIndex !=
NONE) {
12962 for (jVar = 0; jVar < nVar_Second; jVar++) {
12963 Local_Data[jPoint][iVar] = solver[SecondIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
12973 if (dynamic_grid) {
12975 Local_Data[jPoint][iVar] = Grid_Vel[0]; iVar++;
12976 Local_Data[jPoint][iVar] = Grid_Vel[1]; iVar++;
12977 if (geometry->
GetnDim() == 3) {
12978 Local_Data[jPoint][iVar] = Grid_Vel[2];
12998 Local_Data[jPoint][iVar] = Aux_Frict_x[iPoint]; iVar++;
12999 Local_Data[jPoint][iVar] = Aux_Frict_y[iPoint]; iVar++;
13000 if (geometry->
GetnDim() == 3) {
13001 Local_Data[jPoint][iVar] = Aux_Frict_z[iPoint];
13005 Local_Data[jPoint][iVar] = Aux_Buffet[iPoint];
13008 Local_Data[jPoint][iVar] = Aux_Heat[iPoint]; iVar++;
13014 if (Kind_Solver ==
RANS) {
13015 Local_Data[jPoint][iVar] = Aux_yPlus[iPoint]; iVar++;
13040 if (solver[
FLOW_SOL]->VerificationSolution) {
13041 if (solver[
FLOW_SOL]->VerificationSolution->ExactSolutionKnown()) {
13050 su2double mmsSol[5] = {0.0,0.0,0.0,0.0,0.0};
13051 su2double error[5] = {0.0,0.0,0.0,0.0,0.0};
13055 for (jVar = 0; jVar < nVar_First; jVar++) {
13056 Local_Data[jPoint][iVar] = mmsSol[jVar];
13062 for (jVar = 0; jVar < nVar_First; jVar++) {
13063 Local_Data[jPoint][iVar] = error[jVar];
13076 if (geometry->
GetnDim() == 3) {
13082 for (iDim = 0; iDim < nDim; iDim++) {
13083 for (
unsigned short jDim = 0; jDim < nDim; jDim++) {
13092 su2double s12 = 0.5 * (Grad_Vel[0][1] + Grad_Vel[1][0]);
13093 su2double s13 = 0.5 * (Grad_Vel[0][2] + Grad_Vel[2][0]);
13095 su2double s23 = 0.5 * (Grad_Vel[1][2] + Grad_Vel[2][1]);
13097 su2double omega12 = 0.5 * (Grad_Vel[0][1] - Grad_Vel[1][0]);
13098 su2double omega13 = 0.5 * (Grad_Vel[0][2] - Grad_Vel[2][0]);
13099 su2double omega23 = 0.5 * (Grad_Vel[1][2] - Grad_Vel[2][1]);
13101 Q = 2. * pow( omega12, 2.) + 2. * pow( omega13, 2.) + 2. * pow( omega23, 2.) - \
13102 pow( s11, 2.) - pow( s22, 2.) - pow( s33, 2.0) - 2. * pow( s12, 2.) - 2. * pow( s13, 2.) - 2. * pow( s23, 2.0);
13103 Local_Data[jPoint][iVar] = Q; iVar++;
13109 if (rotating_frame) {
13112 Local_Data[jPoint][iVar] = Solution[1]/Solution[0] - Grid_Vel[0]; iVar++;
13113 Local_Data[jPoint][iVar] = Solution[2]/Solution[0] - Grid_Vel[1]; iVar++;
13114 if (geometry->
GetnDim() == 3) {
13115 Local_Data[jPoint][iVar] = Solution[3]/Solution[0] - Grid_Vel[2];
13123 Local_Data[jPoint][iVar] = geometry->
Orthogonality[iPoint]; iVar++;
13124 Local_Data[jPoint][iVar] = geometry->
Aspect_Ratio[iPoint]; iVar++;
13125 Local_Data[jPoint][iVar] = geometry->
Volume_Ratio[iPoint]; iVar++;
13141 delete [] Aux_Frict_x;
13142 delete [] Aux_Frict_y;
13143 delete [] Aux_Frict_z;
13144 delete [] Aux_Heat;
13145 delete [] Aux_yPlus;
13146 delete [] Aux_Buffet;
13149 delete [] Local_Halo;
13155 unsigned short iDim;
13157 unsigned short nDim = geometry->
GetnDim();
13159 unsigned long iVar, jVar;
13160 unsigned long iPoint, jPoint, FirstIndex =
NONE, SecondIndex =
NONE, iMarker, iVertex;
13161 unsigned long nVar_First = 0, nVar_Second = 0, nVar_Consv_Par = 0;
13166 su2double RefDensity = 0.0, RefPressure = 0.0;
13167 su2double *Aux_Frict_x = NULL, *Aux_Frict_y = NULL, *Aux_Frict_z = NULL, *Aux_Heat = NULL, *Aux_yPlus = NULL;
13169 su2double Q, Grad_Vel[3][3] = {{0.0, 0.0, 0.0},{0.0, 0.0, 0.0},{0.0, 0.0, 0.0}};
13173 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
13177 bool wrt_cp = (variable_density &&
13181 int *Local_Halo = NULL;
13183 stringstream varname;
13195 for (iDim = 0; iDim < nDim; iDim++)
13209 factor = 1.0 / (0.5*RefDensity*RefArea*RefVel2);
13217 default: SecondIndex =
NONE;
break;
13220 nVar_First = solver[FirstIndex]->
GetnVar();
13221 if ((!energy) && (!weakly_coupled_heat)) nVar_First--;
13222 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
13223 nVar_Consv_Par = nVar_First + nVar_Second;
13237 nVar_Par = 1; Variable_Names.push_back(
"x");
13238 nVar_Par += 1; Variable_Names.push_back(
"y");
13239 if (geometry->
GetnDim() == 3) {
13240 nVar_Par += 1; Variable_Names.push_back(
"z");
13246 nVar_Par += nVar_Consv_Par;
13250 Variable_Names.push_back(
"Pressure");
13251 Variable_Names.push_back(
"Velocity_x");
13252 Variable_Names.push_back(
"Velocity_y");
13253 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Velocity_z");
13254 if (energy || weakly_coupled_heat) Variable_Names.push_back(
"Temperature");
13256 if (SecondIndex !=
NONE) {
13258 Variable_Names.push_back(
"TKE");
13259 Variable_Names.push_back(
"Omega");
13262 Variable_Names.push_back(
"Nu_Tilde");
13273 nVar_Par += nVar_Consv_Par;
13275 Variable_Names.push_back(
"Limiter_Pressure");
13276 Variable_Names.push_back(
"Limiter_Velocity_x");
13277 Variable_Names.push_back(
"Limiter_Velocity_y");
13278 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Limiter_Velocity_z");
13279 if (energy || weakly_coupled_heat)
13280 Variable_Names.push_back(
"Limiter_Temperature");
13282 if (SecondIndex !=
NONE) {
13284 Variable_Names.push_back(
"Limiter_TKE");
13285 Variable_Names.push_back(
"Limiter_Omega");
13288 Variable_Names.push_back(
"Limiter_Nu_Tilde");
13296 nVar_Par += nVar_Consv_Par;
13298 Variable_Names.push_back(
"Residual_Pressure");
13299 Variable_Names.push_back(
"Residual_Velocity_x");
13300 Variable_Names.push_back(
"Residual_Velocity_y");
13301 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Residual_Velocity_z");
13302 if (energy || weakly_coupled_heat)
13303 Variable_Names.push_back(
"Residual_Temperature");
13305 if (SecondIndex !=
NONE) {
13307 Variable_Names.push_back(
"Residual_TKE");
13308 Variable_Names.push_back(
"Residual_Omega");
13311 Variable_Names.push_back(
"Residual_Nu_Tilde");
13318 if (dynamic_grid) {
13319 if (geometry->
GetnDim() == 2) nVar_Par += 2;
13320 else if (geometry->
GetnDim() == 3) nVar_Par += 3;
13322 Variable_Names.push_back(
"Grid_Velocity_x");
13323 Variable_Names.push_back(
"Grid_Velocity_y");
13324 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Grid_Velocity_z");
13331 Variable_Names.push_back(
"Pressure_Coefficient");
13333 Variable_Names.push_back(
"C<sub>p</sub>");
13340 nVar_Par += 1; Variable_Names.push_back(
"Laminar_Viscosity");
13342 Variable_Names.push_back(
"Skin_Friction_Coefficient_x");
13343 Variable_Names.push_back(
"Skin_Friction_Coefficient_y");
13344 if (geometry->
GetnDim() == 3) {
13345 nVar_Par += 1; Variable_Names.push_back(
"Skin_Friction_Coefficient_z");
13347 if (energy || weakly_coupled_heat) {
13349 Variable_Names.push_back(
"Heat_Flux");
13352 nVar_Par += 1; Variable_Names.push_back(
"<greek>m</greek>");
13354 Variable_Names.push_back(
"C<sub>f</sub>_x");
13355 Variable_Names.push_back(
"C<sub>f</sub>_y");
13356 if (geometry->
GetnDim() == 3) {
13357 nVar_Par += 1; Variable_Names.push_back(
"C<sub>f</sub>_z");
13359 if (energy || weakly_coupled_heat) {
13361 Variable_Names.push_back(
"h");
13371 Variable_Names.push_back(
"Y_Plus");
13372 Variable_Names.push_back(
"Eddy_Viscosity");
13374 Variable_Names.push_back(
"y<sup>+</sup>");
13375 Variable_Names.push_back(
"<greek>m</greek><sub>t</sub>");
13383 Variable_Names.push_back(
"Sharp_Edge_Dist");
13391 Variable_Names.push_back(
"gamma_BC");
13393 Variable_Names.push_back(
"<greek>g</greek><sub>BC</sub>");
13397 if (variable_density) {
13399 Variable_Names.push_back(
"Density");
13404 Variable_Names.push_back(
"Specific_Heat");
13409 Variable_Names.push_back(
"Thermal_Conductivity");
13412 if (solver[
FLOW_SOL]->VerificationSolution) {
13413 if (solver[
FLOW_SOL]->VerificationSolution->ExactSolutionKnown()) {
13414 nVar_Par += 2*nVar_Consv_Par;
13415 Variable_Names.push_back(
"Verification_Pressure");
13416 Variable_Names.push_back(
"Verification_Velocity_x");
13417 Variable_Names.push_back(
"Verification_Velocity_y");
13418 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Verification_Velocity_z");
13419 if (energy || weakly_coupled_heat) Variable_Names.push_back(
"Verification_Temperature");
13420 Variable_Names.push_back(
"Error_Pressure");
13421 Variable_Names.push_back(
"Error_Velocity_x");
13422 Variable_Names.push_back(
"Error_Velocity_y");
13423 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Error_Velocity_z");
13424 if (energy || weakly_coupled_heat) Variable_Names.push_back(
"Error_Temperature");
13430 Variable_Names.push_back(
"Vorticity_x");
13431 Variable_Names.push_back(
"Vorticity_y");
13432 nVar_Par += 1; Variable_Names.push_back(
"Vorticity_z");
13434 if (geometry->
GetnDim() == 3) {
13436 Variable_Names.push_back(
"Q_Criterion");
13442 Variable_Names.push_back(
"Orthogonality");
13444 Variable_Names.push_back(
"Aspect_Ratio");
13446 Variable_Names.push_back(
"Volume_Ratio");
13467 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
13468 Aux_Frict_x[iPoint] = 0.0;
13469 Aux_Frict_y[iPoint] = 0.0;
13470 Aux_Frict_z[iPoint] = 0.0;
13471 Aux_Heat[iPoint] = 0.0;
13472 Aux_yPlus[iPoint] = 0.0;
13474 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
13476 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
13480 if (geometry->
GetnDim() == 3) Aux_Frict_z[iPoint] = solver[
FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 2);
13492 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
13493 Local_Data[iPoint] =
new su2double[nVar_Par];
13496 Local_Halo =
new int[geometry->
GetnPoint()];
13497 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
13505 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
13511 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
13515 if (isPeriodic) Local_Halo[iPoint] =
false;
13535 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
13539 if (!Local_Halo[iPoint] || Wrt_Halo) {
13547 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++) {
13548 Local_Data[jPoint][iVar] = geometry->
node[iPoint]->
GetCoord(iDim); iVar++;
13553 Local_Data[jPoint][iVar] = solver[FirstIndex]->
GetNodes()->
GetSolution(iPoint, 0); iVar++;
13554 Local_Data[jPoint][iVar] = solver[FirstIndex]->
GetNodes()->
GetSolution(iPoint, 1); iVar++;
13555 Local_Data[jPoint][iVar] = solver[FirstIndex]->
GetNodes()->
GetSolution(iPoint, 2); iVar++;
13557 Local_Data[jPoint][iVar] = solver[FirstIndex]->
GetNodes()->
GetSolution(iPoint, 3); iVar++;
13559 if (weakly_coupled_heat) {
13562 }
else if (energy) {
13570 if (SecondIndex !=
NONE) {
13571 for (jVar = 0; jVar < nVar_Second; jVar++) {
13572 Local_Data[jPoint][iVar] = solver[SecondIndex]->
GetNodes()->
GetSolution(iPoint, jVar); iVar++;
13581 for (jVar = 0; jVar < nVar_First; jVar++) {
13586 if (SecondIndex !=
NONE) {
13587 for (jVar = 0; jVar < nVar_Second; jVar++) {
13597 for (jVar = 0; jVar < nVar_First; jVar++) {
13598 Local_Data[jPoint][iVar] = solver[FirstIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
13603 if (SecondIndex !=
NONE) {
13604 for (jVar = 0; jVar < nVar_Second; jVar++) {
13605 Local_Data[jPoint][iVar] = solver[SecondIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
13614 if (dynamic_grid) {
13616 Local_Data[jPoint][iVar] = Grid_Vel[0]; iVar++;
13617 Local_Data[jPoint][iVar] = Grid_Vel[1]; iVar++;
13618 if (geometry->
GetnDim() == 3) {
13619 Local_Data[jPoint][iVar] = Grid_Vel[2];
13636 Local_Data[jPoint][iVar] = Aux_Frict_x[iPoint]; iVar++;
13637 Local_Data[jPoint][iVar] = Aux_Frict_y[iPoint]; iVar++;
13638 if (geometry->
GetnDim() == 3) {
13639 Local_Data[jPoint][iVar] = Aux_Frict_z[iPoint];
13643 if (energy || weakly_coupled_heat) {
13644 Local_Data[jPoint][iVar] = Aux_Heat[iPoint]; iVar++;
13652 Local_Data[jPoint][iVar] = Aux_yPlus[iPoint]; iVar++;
13670 if (variable_density) {
13683 if (solver[
FLOW_SOL]->VerificationSolution) {
13684 if (solver[
FLOW_SOL]->VerificationSolution->ExactSolutionKnown()) {
13693 su2double mmsSol[5] = {0.0,0.0,0.0,0.0,0.0};
13694 su2double error[5] = {0.0,0.0,0.0,0.0,0.0};
13698 for (jVar = 0; jVar < nVar_First; jVar++) {
13699 Local_Data[jPoint][iVar] = mmsSol[jVar];
13705 for (jVar = 0; jVar < nVar_First; jVar++) {
13706 Local_Data[jPoint][iVar] = error[jVar];
13720 for (iDim = 0; iDim < nDim; iDim++) {
13721 for (
unsigned short jDim = 0; jDim < nDim; jDim++) {
13730 su2double s12 = 0.5 * (Grad_Vel[0][1] + Grad_Vel[1][0]);
13731 su2double s13 = 0.5 * (Grad_Vel[0][2] + Grad_Vel[2][0]);
13733 su2double s23 = 0.5 * (Grad_Vel[1][2] + Grad_Vel[2][1]);
13735 su2double omega12 = 0.5 * (Grad_Vel[0][1] - Grad_Vel[1][0]);
13736 su2double omega13 = 0.5 * (Grad_Vel[0][2] - Grad_Vel[2][0]);
13737 su2double omega23 = 0.5 * (Grad_Vel[1][2] - Grad_Vel[2][1]);
13739 Q = 2. * pow( omega12, 2.) + 2. * pow( omega13, 2.) + 2. * pow( omega23, 2.) - \
13740 pow( s11, 2.) - pow( s22, 2.) - pow( s33, 2.0) - 2. * pow( s12, 2.) - 2. * pow( s13, 2.) - 2. * pow( s23, 2.0);
13742 Local_Data[jPoint][iVar] = Q; iVar++;
13749 Local_Data[jPoint][iVar] = geometry->
Orthogonality[iPoint]; iVar++;
13750 Local_Data[jPoint][iVar] = geometry->
Aspect_Ratio[iPoint]; iVar++;
13751 Local_Data[jPoint][iVar] = geometry->
Volume_Ratio[iPoint]; iVar++;
13770 delete [] Aux_Frict_x;
13771 delete [] Aux_Frict_y;
13772 delete [] Aux_Frict_z;
13773 delete [] Aux_Heat;
13774 delete [] Aux_yPlus;
13777 delete [] Local_Halo;
13783 unsigned short iDim;
13785 unsigned short nDim = geometry->
GetnDim();
13787 unsigned long iVar, jVar;
13788 unsigned long iPoint, jPoint, FirstIndex =
NONE, SecondIndex =
NONE, iMarker, iVertex;
13789 unsigned long nVar_First = 0, nVar_Second = 0, nVar_Consv_Par = 0;
13798 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
13802 stringstream varname;
13816 nVar_First = solver[FirstIndex]->
GetnVar();
13817 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
13818 nVar_Consv_Par = nVar_First + nVar_Second;
13832 nVar_Par = 1; Variable_Names.push_back(
"x");
13833 nVar_Par += 1; Variable_Names.push_back(
"y");
13834 if (geometry->
GetnDim() == 3) {
13835 nVar_Par += 1; Variable_Names.push_back(
"z");
13841 nVar_Par += nVar_Consv_Par;
13848 if (incompressible) {
13849 Variable_Names.push_back(
"Adjoint_Pressure");
13850 Variable_Names.push_back(
"Adjoint_Velocity_x");
13851 Variable_Names.push_back(
"Adjoint_Velocity_y");
13852 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Adjoint_Velocity_z");
13853 Variable_Names.push_back(
"Adjoint_Temperature");
13855 Variable_Names.push_back(
"Adjoint_Density");
13856 Variable_Names.push_back(
"Adjoint_Momentum_x");
13857 Variable_Names.push_back(
"Adjoint_Momentum_y");
13858 if (geometry->
GetnDim() == 3)
13859 Variable_Names.push_back(
"Adjoint_Momentum_z");
13860 Variable_Names.push_back(
"Adjoint_Energy");
13862 if (SecondIndex !=
NONE) {
13864 Variable_Names.push_back(
"Adjoint_TKE");
13865 Variable_Names.push_back(
"Adjoint_Omega");
13868 Variable_Names.push_back(
"Adjoint_Nu_Tilde");
13882 Variable_Names.push_back(
"Sensitivity_x");
13883 Variable_Names.push_back(
"Sensitivity_y");
13885 Variable_Names.push_back(
"Sensitivity_z");
13894 nVar_Par += nVar_Consv_Par;
13895 if (incompressible) {
13896 Variable_Names.push_back(
"Limiter_Adjoint_Pressure");
13897 Variable_Names.push_back(
"Limiter_Adjoint_Velocity_x");
13898 Variable_Names.push_back(
"Limiter_Adjoint_Velocity_y");
13899 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Limiter_Adjoint_Velocity_z");
13900 Variable_Names.push_back(
"Limiter_Adjoint_Temperature");
13902 Variable_Names.push_back(
"Limiter_Adjoint_Density");
13903 Variable_Names.push_back(
"Limiter_Adjoint_Momentum_x");
13904 Variable_Names.push_back(
"Limiter_Adjoint_Momentum_y");
13905 if (geometry->
GetnDim() == 3)
13906 Variable_Names.push_back(
"Limiter_Adjoint_Momentum_z");
13907 Variable_Names.push_back(
"Limiter_Adjoint_Energy");
13909 if (SecondIndex !=
NONE) {
13911 Variable_Names.push_back(
"Limiter_Adjoint_TKE");
13912 Variable_Names.push_back(
"Limiter_Adjoint_Omega");
13915 Variable_Names.push_back(
"Limiter_Adjoint_Nu_Tilde");
13923 nVar_Par += nVar_Consv_Par;
13924 if (incompressible) {
13925 Variable_Names.push_back(
"Residual_Adjoint_Pressure");
13926 Variable_Names.push_back(
"Residual_Adjoint_Velocity_x");
13927 Variable_Names.push_back(
"Residual_Adjoint_Velocity_y");
13928 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Residual_Adjoint_Velocity_z");
13929 Variable_Names.push_back(
"Residual_Adjoint_Temperature");
13931 Variable_Names.push_back(
"Residual_Adjoint_Density");
13932 Variable_Names.push_back(
"Residual_Adjoint_Momentum_x");
13933 Variable_Names.push_back(
"Residual_Adjoint_Momentum_y");
13934 if (geometry->
GetnDim() == 3)
13935 Variable_Names.push_back(
"Residual_Adjoint_Momentum_z");
13936 Variable_Names.push_back(
"Residual_Adjoint_Energy");
13938 if (SecondIndex !=
NONE) {
13940 Variable_Names.push_back(
"Residual_Adjoint_TKE");
13941 Variable_Names.push_back(
"Residual_Adjoint_Omega");
13944 Variable_Names.push_back(
"Residual_Adjoint_Nu_Tilde");
13951 if (dynamic_grid) {
13952 if (geometry->
GetnDim() == 2) nVar_Par += 2;
13953 else if (geometry->
GetnDim() == 3) nVar_Par += 3;
13954 Variable_Names.push_back(
"Grid_Velocity_x");
13955 Variable_Names.push_back(
"Grid_Velocity_y");
13956 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Grid_Velocity_z");
13961 nVar_Par += 1; Variable_Names.push_back(
"Surface_Sensitivity");
13971 Variable_Names.push_back(
"Dissipation_Sensor");
13973 Variable_Names.push_back(
"Limiter_Adjoint_Density");
13990 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
13991 Aux_Sens[iPoint] = 0.0;
13993 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++)
13995 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
13999 for (iDim = 0; iDim < nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
14000 Area = sqrt (Area);
14009 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
14010 Local_Data[iPoint] =
new su2double[nVar_Par];
14013 Local_Halo =
new int[geometry->
GetnPoint()];
14014 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
14022 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
14028 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
14032 if (isPeriodic) Local_Halo[iPoint] =
false;
14052 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
14056 if (!Local_Halo[iPoint] || Wrt_Halo) {
14064 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++) {
14065 Local_Data[jPoint][iVar] = geometry->
node[iPoint]->
GetCoord(iDim);
14067 Local_Data[jPoint][iVar] *= 12.0;
14074 for (jVar = 0; jVar < nVar_First; jVar++) {
14084 if (SecondIndex !=
NONE) {
14085 for (jVar = 0; jVar < nVar_Second; jVar++) {
14101 if (geometry->
GetnDim()== 3) {
14108 for (jVar = 0; jVar < nVar_First; jVar++) {
14109 Local_Data[jPoint][iVar] = solver[FirstIndex]->
GetNodes()->
GetLimiter(iPoint, jVar);
14112 if (SecondIndex !=
NONE) {
14113 for (jVar = 0; jVar < nVar_Second; jVar++) {
14114 Local_Data[jPoint][iVar] = solver[SecondIndex]->
GetNodes()->
GetLimiter(iPoint, jVar);
14121 for (jVar = 0; jVar < nVar_First; jVar++) {
14123 Local_Data[jPoint][iVar] = solver[FirstIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
14130 if (SecondIndex !=
NONE) {
14131 for (jVar = 0; jVar < nVar_Second; jVar++) {
14133 Local_Data[jPoint][iVar] = solver[SecondIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
14145 if (dynamic_grid) {
14147 Local_Data[jPoint][iVar] = Grid_Vel[0]; iVar++;
14148 Local_Data[jPoint][iVar] = Grid_Vel[1]; iVar++;
14149 if (geometry->
GetnDim() == 3) {
14150 Local_Data[jPoint][iVar] = Grid_Vel[2];
14157 Local_Data[iPoint][iVar] = Aux_Sens[iPoint]; iVar++;
14185 delete [] Aux_Sens;
14186 delete [] Local_Halo;
14192 unsigned short iDim;
14194 unsigned long iVar, jVar;
14195 unsigned long iPoint, jPoint, FirstIndex =
NONE, iMarker, iVertex;
14196 unsigned long nVar_First = 0, nVar_Consv_Par = 0;
14198 su2double *Node_Vel = NULL, *Node_Accel = NULL, *Stress = NULL;
14200 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
14201 int *Local_Halo = NULL;
14203 stringstream varname;
14213 nVar_First = solver[FirstIndex]->
GetnVar();
14214 nVar_Consv_Par = nVar_First;
14228 nVar_Par = 1; Variable_Names.push_back(
"x");
14229 nVar_Par += 1; Variable_Names.push_back(
"y");
14230 if (geometry->
GetnDim() == 3) {
14231 nVar_Par += 1; Variable_Names.push_back(
"z");
14237 nVar_Par += nVar_Consv_Par;
14244 Variable_Names.push_back(
"Displacement_x");
14245 Variable_Names.push_back(
"Displacement_y");
14246 if (geometry->
GetnDim() == 3)
14247 Variable_Names.push_back(
"Displacement_z");
14256 nVar_Par += nVar_Consv_Par;
14257 Variable_Names.push_back(
"Residual_Displacement_x");
14258 Variable_Names.push_back(
"Residual_Displacement_y");
14259 if (geometry->
GetnDim() == 3)
14260 Variable_Names.push_back(
"Residual_Displacement_z");
14268 Variable_Names.push_back(
"Velocity_x");
14269 Variable_Names.push_back(
"Velocity_y");
14270 if (geometry->
GetnDim() == 3) {
14272 Variable_Names.push_back(
"Velocity_z");
14277 Variable_Names.push_back(
"Acceleration_x");
14278 Variable_Names.push_back(
"Acceleration_y");
14279 if (geometry->
GetnDim() == 3) {
14281 Variable_Names.push_back(
"Acceleration_z");
14290 Variable_Names.push_back(
"Sxx");
14291 Variable_Names.push_back(
"Syy");
14292 Variable_Names.push_back(
"Sxy");
14293 if (geometry->
GetnDim() == 3) {
14295 Variable_Names.push_back(
"Szz");
14296 Variable_Names.push_back(
"Sxz");
14297 Variable_Names.push_back(
"Syz");
14303 Variable_Names.push_back(
"Von_Mises_Stress");
14315 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
14316 Local_Data[iPoint] =
new su2double[nVar_Par];
14319 Local_Halo =
new int[geometry->
GetnPoint()];
14320 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
14328 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
14334 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
14338 if (isPeriodic) Local_Halo[iPoint] =
false;
14358 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
14362 if (!Local_Halo[iPoint] || Wrt_Halo) {
14370 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++) {
14371 Local_Data[jPoint][iVar] = geometry->
node[iPoint]->
GetCoord(iDim);
14373 Local_Data[jPoint][iVar] *= 12.0;
14380 for (jVar = 0; jVar < nVar_First; jVar++) {
14386 for (jVar = 0; jVar < nVar_First; jVar++) {
14387 Local_Data[jPoint][iVar] = solver[FirstIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
14401 Local_Data[jPoint][iVar] = Node_Vel[0]; iVar++;
14402 Local_Data[jPoint][iVar] = Node_Vel[1]; iVar++;
14403 if (geometry->
GetnDim() == 3) {
14404 Local_Data[jPoint][iVar] = Node_Vel[2];
14411 Local_Data[jPoint][iVar] = Node_Accel[0]; iVar++;
14412 Local_Data[jPoint][iVar] = Node_Accel[1]; iVar++;
14413 if (geometry->
GetnDim() == 3) {
14414 Local_Data[jPoint][iVar] = Node_Accel[2];
14426 Local_Data[jPoint][iVar] = Stress[0]; iVar++;
14428 Local_Data[jPoint][iVar] = Stress[1]; iVar++;
14430 Local_Data[jPoint][iVar] = Stress[2]; iVar++;
14432 if (geometry->
GetnDim() == 3) {
14434 Local_Data[jPoint][iVar] = Stress[3]; iVar++;
14436 Local_Data[jPoint][iVar] = Stress[4]; iVar++;
14438 Local_Data[jPoint][iVar] = Stress[5]; iVar++;
14462 delete [] Local_Halo;
14468 unsigned short iDim;
14470 unsigned long iVar, jVar;
14471 unsigned long iPoint, jPoint, FirstIndex =
NONE, iMarker, iVertex;
14472 unsigned long nVar_First = 0, nVar_Consv_Par = 0;
14474 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
14478 stringstream varname;
14487 nVar_First = solver[FirstIndex]->
GetnVar();
14488 nVar_Consv_Par = nVar_First;
14502 nVar_Par = 1; Variable_Names.push_back(
"x");
14503 nVar_Par += 1; Variable_Names.push_back(
"y");
14504 if (geometry->
GetnDim() == 3) {
14505 nVar_Par += 1; Variable_Names.push_back(
"z");
14511 nVar_Par += nVar_Consv_Par;
14512 for (iVar = 0; iVar < nVar_Consv_Par; iVar++) {
14513 varname <<
"Conservative_" << iVar+1;
14514 Variable_Names.push_back(varname.str());
14525 nVar_Par += nVar_Consv_Par;
14526 for (iVar = 0; iVar < nVar_Consv_Par; iVar++) {
14527 varname <<
"Residual_" << iVar+1;
14528 Variable_Names.push_back(varname.str());
14541 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
14542 Local_Data[iPoint] =
new su2double[nVar_Par];
14545 Local_Halo =
new int[geometry->
GetnPoint()];
14546 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
14554 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
14560 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
14564 if (isPeriodic) Local_Halo[iPoint] =
false;
14584 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
14588 if (!Local_Halo[iPoint] || Wrt_Halo) {
14596 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++) {
14597 Local_Data[jPoint][iVar] = geometry->
node[iPoint]->
GetCoord(iDim);
14599 Local_Data[jPoint][iVar] *= 12.0;
14606 for (jVar = 0; jVar < nVar_First; jVar++) {
14612 for (jVar = 0; jVar < nVar_First; jVar++) {
14613 Local_Data[jPoint][iVar] = solver[FirstIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
14632 delete [] Local_Halo;
14652 cout <<
"Sorting volumetric grid connectivity." << endl;
14668 cout <<
"Sorting surface grid connectivity." << endl;
14678 unsigned long nTotal_Elem = nParallel_Tria + nParallel_Quad + nParallel_Tetr + nParallel_Hexa + nParallel_Pris + nParallel_Pyra;
14679 unsigned long nTotal_Surf_Elem = nParallel_Line + nParallel_BoundTria + nParallel_BoundQuad;
14681 nGlobal_Elem_Par = nTotal_Elem;
14682 nSurf_Elem_Par = nTotal_Surf_Elem;
14692 unsigned long iProcessor;
14693 unsigned short NODES_PER_ELEMENT = 0;
14694 unsigned long iPoint, jPoint, kPoint, nLocalPoint, nTotalPoint;
14695 unsigned long nElem_Total = 0, Global_Index;
14697 unsigned long iVertex, iMarker;
14698 int SendRecv, RecvFrom;
14700 bool notPeriodic, notHalo, addedPeriodic, isPeriodic;
14702 int *Local_Halo = NULL;
14703 int *Conn_Elem = NULL;
14716 switch (Elem_Type) {
14744 vector<unsigned long> Added_Periodic;
14745 Added_Periodic.clear();
14748 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
14751 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
14771 unsigned long nAddedPeriodic = 0, maxAddedPeriodic = 0;
14772 unsigned long Buffer_Send_nAddedPeriodic[1], *Buffer_Recv_nAddedPeriodic = NULL;
14773 Buffer_Recv_nAddedPeriodic =
new unsigned long[
size];
14775 nAddedPeriodic = Added_Periodic.size();
14776 Buffer_Send_nAddedPeriodic[0] = nAddedPeriodic;
14784 maxAddedPeriodic = nAddedPeriodic;
14785 Buffer_Recv_nAddedPeriodic[0] = Buffer_Send_nAddedPeriodic[0];
14789 unsigned long *Buffer_Send_AddedPeriodic =
new unsigned long[maxAddedPeriodic];
14790 unsigned long *Buffer_Recv_AddedPeriodic =
new unsigned long[
size*maxAddedPeriodic];
14792 for (iPoint = 0; iPoint < Added_Periodic.size(); iPoint++) {
14793 Buffer_Send_AddedPeriodic[iPoint] = Added_Periodic[iPoint];
14804 for (iPoint = 0; iPoint < maxAddedPeriodic; iPoint++)
14805 Buffer_Recv_AddedPeriodic[iPoint] = Buffer_Send_AddedPeriodic[iPoint];
14815 Local_Halo =
new int[geometry->
GetnPoint()];
14816 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
14819 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
14822 RecvFrom = abs(SendRecv)-1;
14824 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
14831 (SendRecv < 0) && (
rank > RecvFrom));
14843 notPeriodic = (isPeriodic && (SendRecv < 0));
14848 addedPeriodic =
false; kPoint = 0;
14849 for (iProcessor = 0; iProcessor < (
unsigned long)
size; iProcessor++) {
14850 for (jPoint = 0; jPoint < Buffer_Recv_nAddedPeriodic[iProcessor]; jPoint++) {
14851 if (Global_Index == Buffer_Recv_AddedPeriodic[kPoint+jPoint])
14852 addedPeriodic =
true;
14857 kPoint = (iProcessor+1)*maxAddedPeriodic;
14863 if ((notHalo || notPeriodic) && !addedPeriodic) {
14864 Local_Halo[iPoint] =
false;
14875 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
14876 if (Local_Halo[iPoint] ==
false)
14883 nTotalPoint = nLocalPoint;
14890 unsigned long *npoint_procs =
new unsigned long[
size];
14891 unsigned long *starting_node =
new unsigned long[
size];
14892 unsigned long *ending_node =
new unsigned long[
size];
14893 unsigned long *nPoint_Linear =
new unsigned long[
size+1];
14895 unsigned long total_pt_accounted = 0;
14896 for (
int ii = 0; ii <
size; ii++) {
14897 npoint_procs[ii] = nTotalPoint/
size;
14898 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
14903 unsigned long rem_points = nTotalPoint-total_pt_accounted;
14904 for (
unsigned long ii = 0; ii < rem_points; ii++) {
14905 npoint_procs[ii]++;
14910 starting_node[0] = 0;
14911 ending_node[0] = starting_node[0] + npoint_procs[0];
14912 nPoint_Linear[0] = 0;
14913 for (
int ii = 1; ii <
size; ii++) {
14914 starting_node[ii] = ending_node[ii-1];
14915 ending_node[ii] = starting_node[ii] + npoint_procs[ii];
14916 nPoint_Linear[ii] = nPoint_Linear[ii-1] + npoint_procs[ii-1];
14918 nPoint_Linear[
size] = nTotalPoint;
14927 int *nElem_Send =
new int[size+1]; nElem_Send[0] = 0;
14928 int *nElem_Recv =
new int[size+1]; nElem_Recv[0] = 0;
14929 int *nElem_Flag =
new int[
size];
14931 for (
int ii=0; ii <
size; ii++) {
14932 nElem_Send[ii] = 0;
14933 nElem_Recv[ii] = 0;
14934 nElem_Flag[ii]= -1;
14936 nElem_Send[
size] = 0; nElem_Recv[
size] = 0;
14938 for (
int ii = 0; ii < (int)geometry->
GetnElem(); ii++ ) {
14940 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++ ) {
14951 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
14954 if (newID < Global_Index) Global_Index = newID;
14959 iProcessor = Global_Index/npoint_procs[0];
14960 if (iProcessor >= (
unsigned long)size)
14961 iProcessor = (
unsigned long)size-1;
14962 if (Global_Index >= nPoint_Linear[iProcessor])
14963 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
14965 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
14970 if ((nElem_Flag[iProcessor] != ii)) {
14971 nElem_Flag[iProcessor] = ii;
14972 nElem_Send[iProcessor+1]++;
14987 nElem_Recv[1] = nElem_Send[1];
14995 int nSends = 0, nRecvs = 0;
14996 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii] = -1;
14998 for (
int ii = 0; ii <
size; ii++) {
14999 if ((ii !=
rank) && (nElem_Send[ii+1] > 0)) nSends++;
15000 if ((ii !=
rank) && (nElem_Recv[ii+1] > 0)) nRecvs++;
15002 nElem_Send[ii+1] += nElem_Send[ii];
15003 nElem_Recv[ii+1] += nElem_Recv[ii];
15009 unsigned long *connSend = NULL;
15010 connSend =
new unsigned long[NODES_PER_ELEMENT*nElem_Send[
size]];
15011 for (
int ii = 0; ii < NODES_PER_ELEMENT*nElem_Send[
size]; ii++)
15016 unsigned short *haloSend =
new unsigned short[nElem_Send[
size]];
15017 for (
int ii = 0; ii < nElem_Send[
size]; ii++)
15018 haloSend[ii] =
false;
15023 unsigned long *index =
new unsigned long[
size];
15024 for (
int ii=0; ii <
size; ii++) index[ii] = NODES_PER_ELEMENT*nElem_Send[ii];
15026 unsigned long *haloIndex =
new unsigned long[
size];
15027 for (
int ii=0; ii <
size; ii++) haloIndex[ii] = nElem_Send[ii];
15032 for (
int ii = 0; ii < (int)geometry->
GetnElem(); ii++) {
15034 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++ ) {
15045 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
15048 if (newID < Global_Index) Global_Index = newID;
15053 iProcessor = Global_Index/npoint_procs[0];
15054 if (iProcessor >= (
unsigned long)size)
15055 iProcessor = (
unsigned long)size-1;
15056 if (Global_Index >= nPoint_Linear[iProcessor])
15057 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
15059 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
15063 if (nElem_Flag[iProcessor] != ii) {
15065 nElem_Flag[iProcessor] = ii;
15066 unsigned long nn = index[iProcessor];
15067 unsigned long mm = haloIndex[iProcessor];
15071 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
15079 if (Local_Halo[iPoint]) haloSend[mm] =
true;
15085 index[iProcessor] += NODES_PER_ELEMENT;
15086 haloIndex[iProcessor]++;
15096 delete [] haloIndex;
15103 unsigned long *connRecv = NULL;
15104 connRecv =
new unsigned long[NODES_PER_ELEMENT*nElem_Recv[
size]];
15105 for (
int ii = 0; ii < NODES_PER_ELEMENT*nElem_Recv[
size]; ii++)
15108 unsigned short *haloRecv =
new unsigned short[nElem_Recv[
size]];
15109 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
15110 haloRecv[ii] =
false;
15121 unsigned long iMessage = 0;
15122 for (
int ii=0; ii<
size; ii++) {
15123 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
15124 int ll = NODES_PER_ELEMENT*nElem_Recv[ii];
15125 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
15126 int count = NODES_PER_ELEMENT*kk;
15138 for (
int ii=0; ii<
size; ii++) {
15139 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
15140 int ll = NODES_PER_ELEMENT*nElem_Send[ii];
15141 int kk = nElem_Send[ii+1] - nElem_Send[ii];
15142 int count = NODES_PER_ELEMENT*kk;
15144 int tag =
rank + 1;
15154 for (
int ii=0; ii<
size; ii++) {
15155 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
15156 int ll = nElem_Recv[ii];
15157 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
15170 for (
int ii=0; ii<
size; ii++) {
15171 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
15172 int ll = nElem_Send[ii];
15173 int kk = nElem_Send[ii+1] - nElem_Send[ii];
15176 int tag =
rank + 1;
15186 int mm = NODES_PER_ELEMENT*nElem_Recv[
rank];
15187 int ll = NODES_PER_ELEMENT*nElem_Send[
rank];
15188 int kk = NODES_PER_ELEMENT*nElem_Send[
rank+1];
15190 for (
int nn=ll; nn<kk; nn++, mm++) connRecv[mm] = connSend[nn];
15192 mm = nElem_Recv[
rank];
15193 ll = nElem_Send[
rank];
15194 kk = nElem_Send[
rank+1];
15196 for (
int nn=ll; nn<kk; nn++, mm++) haloRecv[mm] = haloSend[nn];
15201 int number = 2*nSends;
15202 for (
int ii = 0; ii < number; ii++)
15206 for (
int ii = 0; ii < number; ii++)
15209 delete [] send_req;
15210 delete [] recv_req;
15218 if (nElem_Recv[size] > 0) Conn_Elem =
new int[NODES_PER_ELEMENT*nElem_Recv[
size]];
15219 int count = 0; nElem_Total = 0;
15220 for (
int ii = 0; ii < nElem_Recv[
size]; ii++) {
15221 if (!haloRecv[ii]) {
15223 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++) {
15224 Conn_Elem[count] = (int)connRecv[ii*NODES_PER_ELEMENT+jj] + 1;
15233 switch (Elem_Type) {
15235 nParallel_Tria = nElem_Total;
15236 if (nParallel_Tria > 0) Conn_Tria_Par = Conn_Elem;
15239 nParallel_Quad = nElem_Total;
15240 if (nParallel_Quad > 0) Conn_Quad_Par = Conn_Elem;
15243 nParallel_Tetr = nElem_Total;
15244 if (nParallel_Tetr > 0) Conn_Tetr_Par = Conn_Elem;
15247 nParallel_Hexa = nElem_Total;
15248 if (nParallel_Hexa > 0) Conn_Hexa_Par = Conn_Elem;
15251 nParallel_Pris = nElem_Total;
15252 if (nParallel_Pris > 0) Conn_Pris_Par = Conn_Elem;
15255 nParallel_Pyra = nElem_Total;
15256 if (nParallel_Pyra > 0) Conn_Pyra_Par = Conn_Elem;
15265 delete [] connSend;
15266 delete [] connRecv;
15267 delete [] haloSend;
15268 delete [] haloRecv;
15269 delete [] Local_Halo;
15270 delete [] nElem_Recv;
15271 delete [] nElem_Send;
15272 delete [] nElem_Flag;
15273 delete [] Buffer_Recv_nAddedPeriodic;
15274 delete [] Buffer_Send_AddedPeriodic;
15275 delete [] Buffer_Recv_AddedPeriodic;
15276 delete [] npoint_procs;
15277 delete [] starting_node;
15278 delete [] ending_node;
15279 delete [] nPoint_Linear;
15285 unsigned long iProcessor;
15286 unsigned short NODES_PER_ELEMENT;
15287 unsigned long iPoint, jPoint, kPoint, nLocalPoint, nTotalPoint;
15288 unsigned long nElem_Total = 0, Global_Index;
15290 unsigned long iVertex, iMarker;
15291 int SendRecv, RecvFrom;
15293 bool notPeriodic, notHalo, addedPeriodic, isPeriodic;
15295 int *Local_Halo = NULL;
15296 int *Conn_Elem = NULL;
15309 switch (Elem_Type) {
15321 NODES_PER_ELEMENT = 0;
15330 vector<unsigned long> Added_Periodic;
15331 Added_Periodic.clear();
15334 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
15337 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15357 unsigned long nAddedPeriodic = 0, maxAddedPeriodic = 0;
15358 unsigned long Buffer_Send_nAddedPeriodic[1], *Buffer_Recv_nAddedPeriodic = NULL;
15359 Buffer_Recv_nAddedPeriodic =
new unsigned long[
size];
15361 nAddedPeriodic = Added_Periodic.size();
15362 Buffer_Send_nAddedPeriodic[0] = nAddedPeriodic;
15370 maxAddedPeriodic = nAddedPeriodic;
15371 Buffer_Recv_nAddedPeriodic[0] = Buffer_Send_nAddedPeriodic[0];
15375 unsigned long *Buffer_Send_AddedPeriodic =
new unsigned long[maxAddedPeriodic];
15376 unsigned long *Buffer_Recv_AddedPeriodic =
new unsigned long[
size*maxAddedPeriodic];
15378 for (iPoint = 0; iPoint < Added_Periodic.size(); iPoint++) {
15379 Buffer_Send_AddedPeriodic[iPoint] = Added_Periodic[iPoint];
15390 for (iPoint = 0; iPoint < maxAddedPeriodic; iPoint++)
15391 Buffer_Recv_AddedPeriodic[iPoint] = Buffer_Send_AddedPeriodic[iPoint];
15401 Local_Halo =
new int[geometry->
GetnPoint()];
15402 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
15405 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
15408 RecvFrom = abs(SendRecv)-1;
15410 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15417 (SendRecv < 0) && (
rank > RecvFrom));
15429 notPeriodic = (isPeriodic && (SendRecv < 0));
15434 addedPeriodic =
false; kPoint = 0;
15435 for (iProcessor = 0; iProcessor < (
unsigned long)
size; iProcessor++) {
15436 for (jPoint = 0; jPoint < Buffer_Recv_nAddedPeriodic[iProcessor]; jPoint++) {
15437 if (Global_Index == Buffer_Recv_AddedPeriodic[kPoint+jPoint])
15438 addedPeriodic =
true;
15443 kPoint = (iProcessor+1)*maxAddedPeriodic;
15449 if ((notHalo || notPeriodic) && !addedPeriodic) {
15450 Local_Halo[iPoint] =
false;
15461 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
15462 if (Local_Halo[iPoint] ==
false)
15469 nTotalPoint = nLocalPoint;
15476 unsigned long *npoint_procs =
new unsigned long[
size];
15477 unsigned long *starting_node =
new unsigned long[
size];
15478 unsigned long *ending_node =
new unsigned long[
size];
15479 unsigned long *nPoint_Linear =
new unsigned long[
size+1];
15481 unsigned long total_pt_accounted = 0;
15482 for (
int ii = 0; ii <
size; ii++) {
15483 npoint_procs[ii] = nTotalPoint/
size;
15484 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
15489 unsigned long rem_points = nTotalPoint-total_pt_accounted;
15490 for (
unsigned long ii = 0; ii < rem_points; ii++) {
15491 npoint_procs[ii]++;
15496 starting_node[0] = 0;
15497 ending_node[0] = starting_node[0] + npoint_procs[0];
15498 nPoint_Linear[0] = 0;
15499 for (
int ii = 1; ii <
size; ii++) {
15500 starting_node[ii] = ending_node[ii-1];
15501 ending_node[ii] = starting_node[ii] + npoint_procs[ii];
15502 nPoint_Linear[ii] = nPoint_Linear[ii-1] + npoint_procs[ii-1];
15504 nPoint_Linear[
size] = nTotalPoint;
15513 int *nElem_Send =
new int[size+1]; nElem_Send[0] = 0;
15514 int *nElem_Recv =
new int[size+1]; nElem_Recv[0] = 0;
15515 int *nElem_Flag =
new int[
size];
15517 for (
int ii=0; ii <
size; ii++) {
15518 nElem_Send[ii] = 0;
15519 nElem_Recv[ii] = 0;
15520 nElem_Flag[ii]= -1;
15522 nElem_Send[
size] = 0; nElem_Recv[
size] = 0;
15524 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
15527 for (
int ii = 0; ii < (int)geometry->
GetnElem_Bound(iMarker); ii++) {
15530 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++ ) {
15541 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
15544 if (newID < Global_Index) Global_Index = newID;
15549 iProcessor = Global_Index/npoint_procs[0];
15550 if (iProcessor >= (
unsigned long)size)
15551 iProcessor = (
unsigned long)size-1;
15552 if (Global_Index >= nPoint_Linear[iProcessor])
15553 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
15555 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
15560 if ((nElem_Flag[iProcessor] != ii)) {
15561 nElem_Flag[iProcessor] = ii;
15562 nElem_Send[iProcessor+1]++;
15579 nElem_Recv[1] = nElem_Send[1];
15587 int nSends = 0, nRecvs = 0;
15588 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii] = -1;
15590 for (
int ii = 0; ii <
size; ii++) {
15591 if ((ii !=
rank) && (nElem_Send[ii+1] > 0)) nSends++;
15592 if ((ii !=
rank) && (nElem_Recv[ii+1] > 0)) nRecvs++;
15594 nElem_Send[ii+1] += nElem_Send[ii];
15595 nElem_Recv[ii+1] += nElem_Recv[ii];
15601 unsigned long *connSend = NULL;
15602 connSend =
new unsigned long[NODES_PER_ELEMENT*nElem_Send[
size]];
15603 for (
int ii = 0; ii < NODES_PER_ELEMENT*nElem_Send[
size]; ii++)
15608 unsigned short *haloSend =
new unsigned short[nElem_Send[
size]];
15609 for (
int ii = 0; ii < nElem_Send[
size]; ii++)
15610 haloSend[ii] =
false;
15615 unsigned long *index =
new unsigned long[
size];
15616 for (
int ii=0; ii <
size; ii++) index[ii] = NODES_PER_ELEMENT*nElem_Send[ii];
15618 unsigned long *haloIndex =
new unsigned long[
size];
15619 for (
int ii=0; ii <
size; ii++) haloIndex[ii] = nElem_Send[ii];
15624 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
15627 for (
int ii = 0; ii < (int)geometry->
GetnElem_Bound(iMarker); ii++) {
15630 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++ ) {
15641 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
15644 if (newID < Global_Index) Global_Index = newID;
15649 iProcessor = Global_Index/npoint_procs[0];
15650 if (iProcessor >= (
unsigned long)size)
15651 iProcessor = (
unsigned long)size-1;
15652 if (Global_Index >= nPoint_Linear[iProcessor])
15653 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
15655 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
15659 if (nElem_Flag[iProcessor] != ii) {
15661 nElem_Flag[iProcessor] = ii;
15662 unsigned long nn = index[iProcessor];
15663 unsigned long mm = haloIndex[iProcessor];
15667 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
15675 if (Local_Halo[iPoint]) haloSend[mm] =
true;
15681 index[iProcessor] += NODES_PER_ELEMENT;
15682 haloIndex[iProcessor]++;
15694 delete [] haloIndex;
15701 unsigned long *connRecv = NULL;
15702 connRecv =
new unsigned long[NODES_PER_ELEMENT*nElem_Recv[
size]];
15703 for (
int ii = 0; ii < NODES_PER_ELEMENT*nElem_Recv[
size]; ii++)
15706 unsigned short *haloRecv =
new unsigned short[nElem_Recv[
size]];
15707 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
15708 haloRecv[ii] =
false;
15719 unsigned long iMessage = 0;
15720 for (
int ii=0; ii<
size; ii++) {
15721 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
15722 int ll = NODES_PER_ELEMENT*nElem_Recv[ii];
15723 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
15724 int count = NODES_PER_ELEMENT*kk;
15736 for (
int ii=0; ii<
size; ii++) {
15737 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
15738 int ll = NODES_PER_ELEMENT*nElem_Send[ii];
15739 int kk = nElem_Send[ii+1] - nElem_Send[ii];
15740 int count = NODES_PER_ELEMENT*kk;
15742 int tag =
rank + 1;
15752 for (
int ii=0; ii<
size; ii++) {
15753 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
15754 int ll = nElem_Recv[ii];
15755 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
15768 for (
int ii=0; ii<
size; ii++) {
15769 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
15770 int ll = nElem_Send[ii];
15771 int kk = nElem_Send[ii+1] - nElem_Send[ii];
15774 int tag =
rank + 1;
15784 int mm = NODES_PER_ELEMENT*nElem_Recv[
rank];
15785 int ll = NODES_PER_ELEMENT*nElem_Send[
rank];
15786 int kk = NODES_PER_ELEMENT*nElem_Send[
rank+1];
15788 for (
int nn=ll; nn<kk; nn++, mm++) connRecv[mm] = connSend[nn];
15790 mm = nElem_Recv[
rank];
15791 ll = nElem_Send[
rank];
15792 kk = nElem_Send[
rank+1];
15794 for (
int nn=ll; nn<kk; nn++, mm++) haloRecv[mm] = haloSend[nn];
15799 int number = 2*nSends;
15800 for (
int ii = 0; ii < number; ii++)
15804 for (
int ii = 0; ii < number; ii++)
15807 delete [] send_req;
15808 delete [] recv_req;
15816 if (nElem_Recv[size] > 0) Conn_Elem =
new int[NODES_PER_ELEMENT*nElem_Recv[
size]];
15817 int count = 0; nElem_Total = 0;
15818 for (
int ii = 0; ii < nElem_Recv[
size]; ii++) {
15819 if (!haloRecv[ii]) {
15821 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++) {
15822 Conn_Elem[count] = (int)connRecv[ii*NODES_PER_ELEMENT+jj] + 1;
15831 switch (Elem_Type) {
15833 nParallel_Line = nElem_Total;
15834 Conn_BoundLine_Par = Conn_Elem;
15837 nParallel_BoundTria = nElem_Total;
15838 Conn_BoundTria_Par = Conn_Elem;
15841 nParallel_BoundQuad = nElem_Total;
15842 Conn_BoundQuad_Par = Conn_Elem;
15851 delete [] connSend;
15852 delete [] connRecv;
15853 delete [] haloSend;
15854 delete [] haloRecv;
15855 delete [] Local_Halo;
15856 delete [] nElem_Recv;
15857 delete [] nElem_Send;
15858 delete [] nElem_Flag;
15859 delete [] Buffer_Recv_nAddedPeriodic;
15860 delete [] Buffer_Send_AddedPeriodic;
15861 delete [] Buffer_Recv_AddedPeriodic;
15862 delete [] npoint_procs;
15863 delete [] starting_node;
15864 delete [] ending_node;
15865 delete [] nPoint_Linear;
15871 unsigned short iMarker;
15872 unsigned long iProcessor;
15873 unsigned long iPoint, Global_Index, nLocalPoint, nTotalPoint, iVertex;
15875 int VARS_PER_POINT = nVar_Par;
15876 int *Local_Halo = NULL;
15890 Local_Halo =
new int[geometry->
GetnPoint()];
15891 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
15894 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
15900 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15904 if (isPeriodic) Local_Halo[iPoint] =
false;
15912 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
15913 if (Local_Halo[iPoint] ==
false)
15920 nTotalPoint = nLocalPoint;
15928 unsigned long *npoint_procs =
new unsigned long[
size];
15929 unsigned long *starting_node =
new unsigned long[
size];
15930 unsigned long *ending_node =
new unsigned long[
size];
15931 unsigned long *nPoint_Linear =
new unsigned long[
size+1];
15933 unsigned long total_pt_accounted = 0;
15934 for (
int ii = 0; ii <
size; ii++) {
15935 npoint_procs[ii] = nTotalPoint/
size;
15936 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
15941 unsigned long rem_points = nTotalPoint-total_pt_accounted;
15942 for (
unsigned long ii = 0; ii < rem_points; ii++) {
15943 npoint_procs[ii]++;
15948 starting_node[0] = 0;
15949 ending_node[0] = starting_node[0] + npoint_procs[0];
15950 nPoint_Linear[0] = 0;
15951 for (
int ii = 1; ii <
size; ii++) {
15952 starting_node[ii] = ending_node[ii-1];
15953 ending_node[ii] = starting_node[ii] + npoint_procs[ii];
15954 nPoint_Linear[ii] = nPoint_Linear[ii-1] + npoint_procs[ii-1];
15956 nPoint_Linear[
size] = nTotalPoint;
15965 int *nPoint_Send =
new int[size+1]; nPoint_Send[0] = 0;
15966 int *nPoint_Recv =
new int[size+1]; nPoint_Recv[0] = 0;
15967 int *nPoint_Flag =
new int[
size];
15969 for (
int ii=0; ii <
size; ii++) {
15970 nPoint_Send[ii] = 0;
15971 nPoint_Recv[ii] = 0;
15972 nPoint_Flag[ii]= -1;
15974 nPoint_Send[
size] = 0; nPoint_Recv[
size] = 0;
15976 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++ ) {
15980 if (!Local_Halo[iPoint]) {
15988 iProcessor = Global_Index/npoint_procs[0];
15989 if (iProcessor >= (
unsigned long)size)
15990 iProcessor = (
unsigned long)size-1;
15991 if (Global_Index >= nPoint_Linear[iProcessor])
15992 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
15994 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
15999 if (nPoint_Flag[iProcessor] != (
int)iPoint) {
16000 nPoint_Flag[iProcessor] = (int)iPoint;
16001 nPoint_Send[iProcessor+1]++;
16015 nPoint_Recv[1] = nPoint_Send[1];
16023 int nSends = 0, nRecvs = 0;
16024 for (
int ii=0; ii <
size; ii++) nPoint_Flag[ii] = -1;
16026 for (
int ii = 0; ii <
size; ii++) {
16027 if ((ii !=
rank) && (nPoint_Send[ii+1] > 0)) nSends++;
16028 if ((ii !=
rank) && (nPoint_Recv[ii+1] > 0)) nRecvs++;
16030 nPoint_Send[ii+1] += nPoint_Send[ii];
16031 nPoint_Recv[ii+1] += nPoint_Recv[ii];
16038 connSend =
new su2double[VARS_PER_POINT*nPoint_Send[
size]];
16039 for (
int ii = 0; ii < VARS_PER_POINT*nPoint_Send[
size]; ii++)
16044 unsigned long *idSend =
new unsigned long[nPoint_Send[
size]];
16045 for (
int ii = 0; ii < nPoint_Send[
size]; ii++)
16051 unsigned long *index =
new unsigned long[
size];
16052 for (
int ii=0; ii <
size; ii++) index[ii] = VARS_PER_POINT*nPoint_Send[ii];
16054 unsigned long *idIndex =
new unsigned long[
size];
16055 for (
int ii=0; ii <
size; ii++) idIndex[ii] = nPoint_Send[ii];
16060 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
16064 if (!Local_Halo[iPoint]) {
16072 iProcessor = Global_Index/npoint_procs[0];
16073 if (iProcessor >= (
unsigned long)size)
16074 iProcessor = (
unsigned long)size-1;
16075 if (Global_Index >= nPoint_Linear[iProcessor])
16076 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
16078 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
16082 if (nPoint_Flag[iProcessor] != (
int)iPoint) {
16084 nPoint_Flag[iProcessor] = (int)iPoint;
16085 unsigned long nn = index[iProcessor];
16089 for (
unsigned short kk = 0; kk < VARS_PER_POINT; kk++) {
16090 connSend[nn] = Local_Data[iPoint][kk]; nn++;
16096 nn = idIndex[iProcessor];
16097 idSend[nn] = Global_Index - starting_node[iProcessor];
16101 index[iProcessor] += VARS_PER_POINT;
16102 idIndex[iProcessor]++;
16119 connRecv =
new su2double[VARS_PER_POINT*nPoint_Recv[
size]];
16120 for (
int ii = 0; ii < VARS_PER_POINT*nPoint_Recv[
size]; ii++)
16123 unsigned long *idRecv =
new unsigned long[nPoint_Recv[
size]];
16124 for (
int ii = 0; ii < nPoint_Recv[
size]; ii++)
16134 unsigned long iMessage = 0;
16135 for (
int ii=0; ii<
size; ii++) {
16136 if ((ii !=
rank) && (nPoint_Recv[ii+1] > nPoint_Recv[ii])) {
16137 int ll = VARS_PER_POINT*nPoint_Recv[ii];
16138 int kk = nPoint_Recv[ii+1] - nPoint_Recv[ii];
16139 int count = VARS_PER_POINT*kk;
16151 for (
int ii=0; ii<
size; ii++) {
16152 if ((ii !=
rank) && (nPoint_Send[ii+1] > nPoint_Send[ii])) {
16153 int ll = VARS_PER_POINT*nPoint_Send[ii];
16154 int kk = nPoint_Send[ii+1] - nPoint_Send[ii];
16155 int count = VARS_PER_POINT*kk;
16157 int tag =
rank + 1;
16167 for (
int ii=0; ii<
size; ii++) {
16168 if ((ii !=
rank) && (nPoint_Recv[ii+1] > nPoint_Recv[ii])) {
16169 int ll = nPoint_Recv[ii];
16170 int kk = nPoint_Recv[ii+1] - nPoint_Recv[ii];
16183 for (
int ii=0; ii<
size; ii++) {
16184 if ((ii !=
rank) && (nPoint_Send[ii+1] > nPoint_Send[ii])) {
16185 int ll = nPoint_Send[ii];
16186 int kk = nPoint_Send[ii+1] - nPoint_Send[ii];
16189 int tag =
rank + 1;
16199 int mm = VARS_PER_POINT*nPoint_Recv[
rank];
16200 int ll = VARS_PER_POINT*nPoint_Send[
rank];
16201 int kk = VARS_PER_POINT*nPoint_Send[
rank+1];
16203 for (
int nn=ll; nn<kk; nn++, mm++) connRecv[mm] = connSend[nn];
16205 mm = nPoint_Recv[
rank];
16206 ll = nPoint_Send[
rank];
16207 kk = nPoint_Send[
rank+1];
16209 for (
int nn=ll; nn<kk; nn++, mm++) idRecv[mm] = idSend[nn];
16214 int number = 2*nSends;
16215 for (
int ii = 0; ii < number; ii++)
16219 for (
int ii = 0; ii < number; ii++)
16222 delete [] send_req;
16223 delete [] recv_req;
16230 Parallel_Data =
new su2double*[VARS_PER_POINT];
16231 for (
int jj = 0; jj < VARS_PER_POINT; jj++) {
16233 for (
int ii = 0; ii < nPoint_Recv[
size]; ii++) {
16234 Parallel_Data[jj][idRecv[ii]] = connRecv[ii*VARS_PER_POINT+jj];
16241 nParallel_Poin = nPoint_Recv[
size];
16246 nGlobal_Poin_Par = nParallel_Poin;
16254 delete [] connSend;
16255 delete [] connRecv;
16258 delete [] nPoint_Recv;
16259 delete [] nPoint_Send;
16260 delete [] nPoint_Flag;
16262 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
16263 delete [] Local_Data[iPoint];
16264 delete [] Local_Data;
16266 delete [] Local_Halo;
16267 delete [] npoint_procs;
16268 delete [] starting_node;
16269 delete [] ending_node;
16270 delete [] nPoint_Linear;
16276 unsigned short iMarker;
16277 unsigned long iProcessor;
16278 unsigned long iPoint, jPoint, kPoint, iElem;
16279 unsigned long Global_Index, nLocalPoint, nTotalPoint, iVertex;
16281 int VARS_PER_POINT = nVar_Par;
16282 int *Local_Halo = NULL;
16284 int SendRecv, RecvFrom;
16286 bool notPeriodic, notHalo, addedPeriodic, isPeriodic;
16311 Local_Halo =
new int[geometry->
GetnPoint()];
16312 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
16315 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
16321 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
16325 if (isPeriodic) Local_Halo[iPoint] =
false;
16333 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
16334 if (Local_Halo[iPoint] ==
false)
16341 nTotalPoint = nLocalPoint;
16349 unsigned long *npoint_procs =
new unsigned long[
size];
16350 unsigned long *starting_node =
new unsigned long[
size];
16351 unsigned long *ending_node =
new unsigned long[
size];
16353 unsigned long *nPoint_Linear_Nodes =
new unsigned long[
size+1];
16354 unsigned long *nPoint_Linear_Elems =
new unsigned long[
size+1];
16356 unsigned long total_pt_accounted = 0;
16357 for (
int ii = 0; ii <
size; ii++) {
16358 npoint_procs[ii] = nTotalPoint/
size;
16359 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
16364 unsigned long rem_points = nTotalPoint-total_pt_accounted;
16365 for (
unsigned long ii = 0; ii < rem_points; ii++) {
16366 npoint_procs[ii]++;
16371 starting_node[0] = 0;
16372 ending_node[0] = starting_node[0] + npoint_procs[0];
16373 nPoint_Linear_Nodes[0] = 0;
16374 for (
int ii = 1; ii <
size; ii++) {
16375 starting_node[ii] = ending_node[ii-1];
16376 ending_node[ii] = starting_node[ii] + npoint_procs[ii];
16377 nPoint_Linear_Nodes[ii] = nPoint_Linear_Nodes[ii-1] + npoint_procs[ii-1];
16379 nPoint_Linear_Nodes[
size] = nTotalPoint;
16384 int *nElem_Send =
new int[size+1]; nElem_Send[0] = 0;
16385 int *nElem_Recv =
new int[size+1]; nElem_Recv[0] = 0;
16386 int *nElem_Flag =
new int[
size];
16388 for (
int ii=0; ii <
size; ii++) {
16389 nElem_Send[ii] = 0;
16390 nElem_Recv[ii] = 0;
16391 nElem_Flag[ii]= -1;
16393 nElem_Send[
size] = 0; nElem_Recv[
size] = 0;
16398 for (
int ii = 0; ii < (int)nParallel_Line; ii++) {
16403 iNode = ii*N_POINTS_LINE+jj;
16404 Global_Index = Conn_BoundLine_Par[iNode]-1;
16408 iProcessor = Global_Index/npoint_procs[0];
16409 if (iProcessor >= (
unsigned long)
size)
16410 iProcessor = (
unsigned long)size-1;
16411 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16412 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16414 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16419 if ((nElem_Flag[iProcessor] != iNode)) {
16420 nElem_Flag[iProcessor] = iNode;
16421 nElem_Send[iProcessor+1]++;
16430 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
16432 for (
int ii = 0; ii < (int)nParallel_BoundTria; ii++) {
16437 iNode = ii*N_POINTS_TRIANGLE + jj;
16438 Global_Index = Conn_BoundTria_Par[iNode]-1;
16442 iProcessor = Global_Index/npoint_procs[0];
16443 if (iProcessor >= (
unsigned long)
size)
16444 iProcessor = (
unsigned long)size-1;
16445 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16446 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16448 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16453 if ((nElem_Flag[iProcessor] != iNode)) {
16454 nElem_Flag[iProcessor] = iNode;
16455 nElem_Send[iProcessor+1]++;
16464 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
16466 for (
int ii = 0; ii < (int)nParallel_BoundQuad; ii++) {
16471 iNode = ii*N_POINTS_QUADRILATERAL+jj;
16472 Global_Index = Conn_BoundQuad_Par[iNode]-1;
16476 iProcessor = Global_Index/npoint_procs[0];
16477 if (iProcessor >= (
unsigned long)
size)
16478 iProcessor = (
unsigned long)size-1;
16479 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16480 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16482 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16487 if ((nElem_Flag[iProcessor] != iNode)) {
16488 nElem_Flag[iProcessor] = iNode;
16489 nElem_Send[iProcessor+1]++;
16503 nElem_Recv[1] = nElem_Send[1];
16511 int nSends = 0, nRecvs = 0;
16512 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii] = -1;
16514 for (
int ii = 0; ii <
size; ii++) {
16515 if ((ii !=
rank) && (nElem_Send[ii+1] > 0)) nSends++;
16516 if ((ii !=
rank) && (nElem_Recv[ii+1] > 0)) nRecvs++;
16518 nElem_Send[ii+1] += nElem_Send[ii];
16519 nElem_Recv[ii+1] += nElem_Recv[ii];
16524 unsigned long *idSend =
new unsigned long[nElem_Send[
size]];
16525 for (
int ii = 0; ii < nElem_Send[
size]; ii++) idSend[ii] = 0;
16530 unsigned long *idIndex =
new unsigned long[
size];
16531 for (
int ii=0; ii <
size; ii++) idIndex[ii] = nElem_Send[ii];
16536 for (
int ii = 0; ii < (int)nParallel_Line; ii++) {
16541 iNode = ii*N_POINTS_LINE+jj;
16542 Global_Index = Conn_BoundLine_Par[iNode]-1;
16546 iProcessor = Global_Index/npoint_procs[0];
16547 if (iProcessor >= (
unsigned long)
size)
16548 iProcessor = (
unsigned long)size-1;
16549 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16550 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16552 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16556 if (nElem_Flag[iProcessor] != iNode) {
16558 nElem_Flag[iProcessor] = iNode;
16559 unsigned long nn = idIndex[iProcessor];
16563 idSend[nn] = Global_Index; nn++;
16567 idIndex[iProcessor]++;
16574 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
16576 for (
int ii = 0; ii < (int)nParallel_BoundTria; ii++) {
16581 iNode = ii*N_POINTS_TRIANGLE + jj;
16582 Global_Index = Conn_BoundTria_Par[iNode]-1;
16586 iProcessor = Global_Index/npoint_procs[0];
16587 if (iProcessor >= (
unsigned long)
size)
16588 iProcessor = (
unsigned long)size-1;
16589 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16590 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16592 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16596 if (nElem_Flag[iProcessor] != iNode) {
16598 nElem_Flag[iProcessor] = iNode;
16599 unsigned long nn = idIndex[iProcessor];
16603 idSend[nn] = Global_Index; nn++;
16607 idIndex[iProcessor]++;
16614 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
16616 for (
int ii = 0; ii < (int)nParallel_BoundQuad; ii++) {
16621 iNode = ii*N_POINTS_QUADRILATERAL+jj;
16622 Global_Index = Conn_BoundQuad_Par[iNode]-1;
16626 iProcessor = Global_Index/npoint_procs[0];
16627 if (iProcessor >= (
unsigned long)
size)
16628 iProcessor = (
unsigned long)size-1;
16629 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16630 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16632 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16636 if (nElem_Flag[iProcessor] != iNode) {
16638 nElem_Flag[iProcessor] = iNode;
16639 unsigned long nn = idIndex[iProcessor];
16643 idSend[nn] = Global_Index; nn++;
16647 idIndex[iProcessor]++;
16659 unsigned long *idRecv = NULL;
16660 idRecv =
new unsigned long[nElem_Recv[
size]];
16661 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
16673 unsigned long iMessage = 0;
16674 for (
int ii=0; ii<
size; ii++) {
16675 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
16676 int ll = nElem_Recv[ii];
16677 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
16690 for (
int ii=0; ii<
size; ii++) {
16691 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
16692 int ll = nElem_Send[ii];
16693 int kk = nElem_Send[ii+1] - nElem_Send[ii];
16696 int tag =
rank + 1;
16706 int mm = nElem_Recv[
rank];
16707 int ll = nElem_Send[
rank];
16708 int kk = nElem_Send[
rank+1];
16710 for (
int nn=ll; nn<kk; nn++, mm++) idRecv[mm] = idSend[nn];
16715 int number = nSends;
16716 for (
int ii = 0; ii < number; ii++)
16720 for (
int ii = 0; ii < number; ii++)
16723 delete [] send_req;
16724 delete [] recv_req;
16740 int *surfPoint =
new int[nParallel_Poin];
16741 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) surfPoint[iPoint] = -1;
16743 for (
int ii = 0; ii < nElem_Recv[
size]; ii++) {
16744 surfPoint[(int)idRecv[ii]- starting_node[
rank]] = (
int)idRecv[ii];
16749 nSurf_Poin_Par = 0;
16750 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) {
16751 if (surfPoint[iPoint] != -1) {
16760 int *nPoint_Send =
new int[size+1]; nPoint_Send[0] = 0;
16761 int *nPoint_Recv =
new int[size+1]; nPoint_Recv[0] = 0;
16763 for (
int ii=1; ii < size+1; ii++) nPoint_Send[ii]= (
int)nSurf_Poin_Par;
16769 nPoint_Recv[1] = nPoint_Send[1];
16774 for (
int ii = 0; ii <
size; ii++) {
16775 nPoint_Send[ii+1] += nPoint_Send[ii];
16776 nPoint_Recv[ii+1] += nPoint_Recv[ii];
16783 Parallel_Surf_Data =
new su2double*[VARS_PER_POINT];
16784 for (
int jj = 0; jj < VARS_PER_POINT; jj++) {
16785 Parallel_Surf_Data[jj] =
new su2double[nSurf_Poin_Par];
16787 for (
int ii = 0; ii < (int)nParallel_Poin; ii++) {
16788 if (surfPoint[ii] !=-1) {
16789 Parallel_Surf_Data[jj][count] = Parallel_Data[jj][ii];
16799 nGlobal_Surf_Poin = nSurf_Poin_Par;
16810 unsigned long *globalP =
new unsigned long[nSurf_Poin_Par];
16811 unsigned long *renumbP =
new unsigned long[nSurf_Poin_Par];
16814 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) {
16815 if (surfPoint[iPoint] != -1) {
16816 globalP[count] = surfPoint[iPoint];
16817 renumbP[count] = count + nPoint_Recv[
rank];
16843 vector<unsigned long> Added_Periodic;
16844 Added_Periodic.clear();
16847 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
16850 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
16870 unsigned long nAddedPeriodic = 0, maxAddedPeriodic = 0;
16871 unsigned long Buffer_Send_nAddedPeriodic[1], *Buffer_Recv_nAddedPeriodic = NULL;
16872 Buffer_Recv_nAddedPeriodic =
new unsigned long[
size];
16874 nAddedPeriodic = Added_Periodic.size();
16875 Buffer_Send_nAddedPeriodic[0] = nAddedPeriodic;
16883 maxAddedPeriodic = nAddedPeriodic;
16884 Buffer_Recv_nAddedPeriodic[0] = Buffer_Send_nAddedPeriodic[0];
16888 unsigned long *Buffer_Send_AddedPeriodic =
new unsigned long[maxAddedPeriodic];
16889 unsigned long *Buffer_Recv_AddedPeriodic =
new unsigned long[size*maxAddedPeriodic];
16891 for (iPoint = 0; iPoint < Added_Periodic.size(); iPoint++) {
16892 Buffer_Send_AddedPeriodic[iPoint] = Added_Periodic[iPoint];
16903 for (iPoint = 0; iPoint < maxAddedPeriodic; iPoint++)
16904 Buffer_Recv_AddedPeriodic[iPoint] = Buffer_Send_AddedPeriodic[iPoint];
16914 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
16917 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
16920 RecvFrom = abs(SendRecv)-1;
16922 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
16929 (SendRecv < 0) && (
rank > RecvFrom));
16941 notPeriodic = (isPeriodic && (SendRecv < 0));
16946 addedPeriodic =
false; kPoint = 0;
16947 for (iProcessor = 0; iProcessor < (
unsigned long)size; iProcessor++) {
16948 for (jPoint = 0; jPoint < Buffer_Recv_nAddedPeriodic[iProcessor]; jPoint++) {
16949 if (Global_Index == Buffer_Recv_AddedPeriodic[kPoint+jPoint])
16950 addedPeriodic =
true;
16955 kPoint = (iProcessor+1)*maxAddedPeriodic;
16961 if ((notHalo || notPeriodic) && !addedPeriodic) {
16962 Local_Halo[iPoint] =
false;
16973 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
16974 if (Local_Halo[iPoint] ==
false)
16981 nTotalPoint = nLocalPoint;
16988 total_pt_accounted = 0;
16989 for (
int ii = 0; ii <
size; ii++) {
16990 npoint_procs[ii] = nTotalPoint/
size;
16991 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
16996 rem_points = nTotalPoint-total_pt_accounted;
16997 for (
unsigned long ii = 0; ii < rem_points; ii++) {
16998 npoint_procs[ii]++;
17003 starting_node[0] = 0;
17004 ending_node[0] = starting_node[0] + npoint_procs[0];
17005 nPoint_Linear_Elems[0] = 0;
17006 for (
int ii = 1; ii <
size; ii++) {
17007 starting_node[ii] = ending_node[ii-1];
17008 ending_node[ii] = starting_node[ii] + npoint_procs[ii];
17009 nPoint_Linear_Elems[ii] = nPoint_Linear_Elems[ii-1] + npoint_procs[ii-1];
17011 nPoint_Linear_Elems[
size] = nTotalPoint;
17015 for (
int ii=0; ii <
size; ii++) {
17016 nElem_Send[ii] = 0;
17017 nElem_Recv[ii] = 0;
17018 nElem_Flag[ii]= -1;
17020 nElem_Send[
size] = 0; nElem_Recv[
size] = 0;
17025 for (
int ii = 0; ii < (int)nSurf_Poin_Par; ii++) {
17027 Global_Index = globalP[ii];
17031 iProcessor = Global_Index/npoint_procs[0];
17032 if (iProcessor >= (
unsigned long)
size)
17033 iProcessor = (
unsigned long)size-1;
17034 if (Global_Index >= nPoint_Linear_Elems[iProcessor])
17035 while(Global_Index >= nPoint_Linear_Elems[iProcessor+1]) iProcessor++;
17037 while(Global_Index < nPoint_Linear_Elems[iProcessor]) iProcessor--;
17042 if ((nElem_Flag[iProcessor] != ii)) {
17043 nElem_Flag[iProcessor] = ii;
17044 nElem_Send[iProcessor+1]++;
17057 nElem_Recv[1] = nElem_Send[1];
17065 nSends = 0; nRecvs = 0;
17066 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii] = -1;
17068 for (
int ii = 0; ii <
size; ii++) {
17069 if ((ii !=
rank) && (nElem_Send[ii+1] > 0)) nSends++;
17070 if ((ii !=
rank) && (nElem_Recv[ii+1] > 0)) nRecvs++;
17072 nElem_Send[ii+1] += nElem_Send[ii];
17073 nElem_Recv[ii+1] += nElem_Recv[ii];
17079 unsigned long *globalSend = NULL;
17080 globalSend =
new unsigned long[nElem_Send[
size]];
17081 for (
int ii = 0; ii < nElem_Send[
size]; ii++)
17082 globalSend[ii] = 0;
17087 unsigned long *renumbSend = NULL;
17088 renumbSend =
new unsigned long[nElem_Send[
size]];
17089 for (
int ii = 0; ii < nElem_Send[
size]; ii++)
17090 renumbSend[ii] = 0;
17095 unsigned long *index =
new unsigned long[
size];
17096 for (
int ii=0; ii <
size; ii++) index[ii] = nElem_Send[ii];
17101 for (
int ii = 0; ii < (int)nSurf_Poin_Par; ii++) {
17103 Global_Index = globalP[ii];
17107 iProcessor = Global_Index/npoint_procs[0];
17108 if (iProcessor >= (
unsigned long)
size)
17109 iProcessor = (
unsigned long)size-1;
17110 if (Global_Index >= nPoint_Linear_Elems[iProcessor])
17111 while(Global_Index >= nPoint_Linear_Elems[iProcessor+1]) iProcessor++;
17113 while(Global_Index < nPoint_Linear_Elems[iProcessor]) iProcessor--;
17116 if (nElem_Flag[iProcessor] != ii) {
17118 nElem_Flag[iProcessor] = ii;
17119 unsigned long nn = index[iProcessor];
17121 globalSend[nn] = Global_Index;
17122 renumbSend[nn] = renumbP[ii];
17126 index[iProcessor]++;
17140 unsigned long *globalRecv = NULL;
17141 globalRecv =
new unsigned long[nElem_Recv[
size]];
17142 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
17143 globalRecv[ii] = 0;
17145 unsigned long *renumbRecv = NULL;
17146 renumbRecv =
new unsigned long[nElem_Recv[
size]];
17147 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
17148 renumbRecv[ii] = 0;
17160 for (
int ii=0; ii<
size; ii++) {
17161 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
17162 int ll = nElem_Recv[ii];
17163 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
17176 for (
int ii=0; ii<
size; ii++) {
17177 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
17178 int ll = nElem_Send[ii];
17179 int kk = nElem_Send[ii+1] - nElem_Send[ii];
17182 int tag =
rank + 1;
17192 for (
int ii=0; ii<
size; ii++) {
17193 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
17194 int ll = nElem_Recv[ii];
17195 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
17208 for (
int ii=0; ii<
size; ii++) {
17209 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
17210 int ll = nElem_Send[ii];
17211 int kk = nElem_Send[ii+1] - nElem_Send[ii];
17214 int tag =
rank + 1;
17225 mm = nElem_Recv[
rank];
17226 ll = nElem_Send[
rank];
17227 kk = nElem_Send[
rank+1];
17229 for (
int nn=ll; nn<kk; nn++, mm++) globalRecv[mm] = globalSend[nn];
17231 mm = nElem_Recv[
rank];
17232 ll = nElem_Send[
rank];
17233 kk = nElem_Send[
rank+1];
17235 for (
int nn=ll; nn<kk; nn++, mm++) renumbRecv[mm] = renumbSend[nn];
17241 for (
int ii = 0; ii < number; ii++)
17245 for (
int ii = 0; ii < number; ii++)
17248 delete [] send_req;
17249 delete [] recv_req;
17256 map<unsigned long,unsigned long> Global2Renumber;
17257 for (
int ii = 0; ii < nElem_Recv[
size]; ii++) {
17258 Global2Renumber[globalRecv[ii]] = renumbRecv[ii] + 1;
17269 vector<unsigned long>::iterator it;
17270 vector<unsigned long> outliers;
17272 for (
int ii = 0; ii < (int)nParallel_Line; ii++) {
17275 iNode = ii*N_POINTS_LINE+jj;
17276 Global_Index = Conn_BoundLine_Par[iNode]-1;
17280 iProcessor = Global_Index/npoint_procs[0];
17281 if (iProcessor >= (
unsigned long)
size)
17282 iProcessor = (
unsigned long)size-1;
17283 if (Global_Index >= nPoint_Linear_Elems[iProcessor])
17284 while(Global_Index >= nPoint_Linear_Elems[iProcessor+1]) iProcessor++;
17286 while(Global_Index < nPoint_Linear_Elems[iProcessor]) iProcessor--;
17290 if ((iProcessor != (
unsigned long)
rank)) {
17291 outliers.push_back(Global_Index);
17297 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
17299 for (
int ii = 0; ii < (int)nParallel_BoundTria; ii++) {
17302 iNode = ii*N_POINTS_TRIANGLE + jj;
17303 Global_Index = Conn_BoundTria_Par[iNode]-1;
17307 iProcessor = Global_Index/npoint_procs[0];
17308 if (iProcessor >= (
unsigned long)
size)
17309 iProcessor = (
unsigned long)size-1;
17310 if (Global_Index >= nPoint_Linear_Elems[iProcessor])
17311 while(Global_Index >= nPoint_Linear_Elems[iProcessor+1]) iProcessor++;
17313 while(Global_Index < nPoint_Linear_Elems[iProcessor]) iProcessor--;
17317 if ((iProcessor != (
unsigned long)
rank)) {
17318 outliers.push_back(Global_Index);
17324 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
17326 for (
int ii = 0; ii < (int)nParallel_BoundQuad; ii++) {
17329 iNode = ii*N_POINTS_QUADRILATERAL+jj;
17330 Global_Index = Conn_BoundQuad_Par[iNode]-1;
17334 iProcessor = Global_Index/npoint_procs[0];
17335 if (iProcessor >= (
unsigned long)
size)
17336 iProcessor = (
unsigned long)size-1;
17337 if (Global_Index >= nPoint_Linear_Elems[iProcessor])
17338 while(Global_Index >= nPoint_Linear_Elems[iProcessor+1]) iProcessor++;
17340 while(Global_Index < nPoint_Linear_Elems[iProcessor]) iProcessor--;
17344 if ((iProcessor != (
unsigned long)
rank)) {
17345 outliers.push_back(Global_Index);
17354 sort(outliers.begin(), outliers.end());
17355 it = unique(outliers.begin(), outliers.end());
17356 outliers.resize(it - outliers.begin());
17362 for (
int ii=0; ii <
size; ii++) {
17363 nElem_Send[ii] = 0;
17364 nElem_Recv[ii] = 0;
17365 nElem_Flag[ii]= -1;
17367 nElem_Send[
size] = 0; nElem_Recv[
size] = 0;
17369 for (
int ii = 0; ii < (int)outliers.size(); ii++) {
17371 Global_Index = outliers[ii];
17375 iProcessor = Global_Index/npoint_procs[0];
17376 if (iProcessor >= (
unsigned long)
size)
17377 iProcessor = (
unsigned long)size-1;
17378 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
17379 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
17381 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
17386 if ((nElem_Flag[iProcessor] != ii)) {
17387 nElem_Flag[iProcessor] = ii;
17388 nElem_Send[iProcessor+1]++;
17401 nElem_Recv[1] = nElem_Send[1];
17409 nSends = 0; nRecvs = 0;
17410 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii] = -1;
17412 for (
int ii = 0; ii <
size; ii++) {
17413 if ((ii !=
rank) && (nElem_Send[ii+1] > 0)) nSends++;
17414 if ((ii !=
rank) && (nElem_Recv[ii+1] > 0)) nRecvs++;
17416 nElem_Send[ii+1] += nElem_Send[ii];
17417 nElem_Recv[ii+1] += nElem_Recv[ii];
17421 idSend =
new unsigned long[nElem_Send[
size]];
17422 for (
int ii = 0; ii < nElem_Send[
size]; ii++)
17427 for (
int ii=0; ii <
size; ii++) idIndex[ii] = nElem_Send[ii];
17431 for (
int ii = 0; ii < (int)outliers.size(); ii++) {
17433 Global_Index = outliers[ii];
17437 iProcessor = Global_Index/npoint_procs[0];
17438 if (iProcessor >= (
unsigned long)
size)
17439 iProcessor = (
unsigned long)size-1;
17440 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
17441 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
17443 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
17448 if ((nElem_Flag[iProcessor] != ii)) {
17450 nElem_Flag[iProcessor] = ii;
17451 unsigned long nn = idIndex[iProcessor];
17455 idSend[nn] = Global_Index; nn++;
17459 idIndex[iProcessor]++;
17470 idRecv =
new unsigned long[nElem_Recv[
size]];
17471 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
17484 for (
int ii=0; ii<
size; ii++) {
17485 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
17486 int ll = nElem_Recv[ii];
17487 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
17500 for (
int ii=0; ii<
size; ii++) {
17501 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
17502 int ll = nElem_Send[ii];
17503 int kk = nElem_Send[ii+1] - nElem_Send[ii];
17506 int tag =
rank + 1;
17516 mm = nElem_Recv[
rank];
17517 ll = nElem_Send[
rank];
17518 kk = nElem_Send[
rank+1];
17520 for (
int nn=ll; nn<kk; nn++, mm++) idRecv[mm] = idSend[nn];
17526 for (
int ii = 0; ii < number; ii++)
17530 for (
int ii = 0; ii < number; ii++)
17533 delete [] send_req;
17534 delete [] recv_req;
17540 for (
int ii = 0; ii < nElem_Recv[
size]; ii++) {
17541 for (iPoint = 0; iPoint < nSurf_Poin_Par; iPoint++) {
17542 if (idRecv[ii] == globalP[iPoint]) {
17543 idRecv[ii] = renumbP[iPoint];
17561 for (
int ii=0; ii<
size; ii++) {
17562 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
17563 int ll = nElem_Send[ii];
17564 int kk = nElem_Send[ii+1] - nElem_Send[ii];
17577 for (
int ii=0; ii<
size; ii++) {
17578 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
17579 int ll = nElem_Recv[ii];
17580 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
17583 int tag =
rank + 1;
17593 mm = nElem_Send[
rank];
17594 ll = nElem_Recv[
rank];
17595 kk = nElem_Recv[
rank+1];
17597 for (
int nn=ll; nn<kk; nn++, mm++) idSend[mm] = idRecv[nn];
17603 for (
int ii = 0; ii < number; ii++)
17607 for (
int ii = 0; ii < number; ii++)
17610 delete [] send_req;
17611 delete [] recv_req;
17618 for (
int ii = 0; ii < nElem_Send[
size]; ii++) {
17619 Global2Renumber[outliers[ii]] = idSend[ii] + 1;
17626 for (iElem = 0; iElem < nParallel_Line; iElem++) {
17628 Conn_BoundLine_Par[iNode+0] = (int)Global2Renumber[Conn_BoundLine_Par[iNode+0]-1];
17629 Conn_BoundLine_Par[iNode+1] = (int)Global2Renumber[Conn_BoundLine_Par[iNode+1]-1];
17632 for (iElem = 0; iElem < nParallel_BoundTria; iElem++) {
17634 Conn_BoundTria_Par[iNode+0] = (int)Global2Renumber[Conn_BoundTria_Par[iNode+0]-1];
17635 Conn_BoundTria_Par[iNode+1] = (int)Global2Renumber[Conn_BoundTria_Par[iNode+1]-1];
17636 Conn_BoundTria_Par[iNode+2] = (int)Global2Renumber[Conn_BoundTria_Par[iNode+2]-1];
17639 for (iElem = 0; iElem < nParallel_BoundQuad; iElem++) {
17641 Conn_BoundQuad_Par[iNode+0] = (int)Global2Renumber[Conn_BoundQuad_Par[iNode+0]-1];
17642 Conn_BoundQuad_Par[iNode+1] = (int)Global2Renumber[Conn_BoundQuad_Par[iNode+1]-1];
17643 Conn_BoundQuad_Par[iNode+2] = (int)Global2Renumber[Conn_BoundQuad_Par[iNode+2]-1];
17644 Conn_BoundQuad_Par[iNode+3] = (int)Global2Renumber[Conn_BoundQuad_Par[iNode+3]-1];
17650 delete [] surfPoint;
17656 delete [] globalSend;
17657 delete [] globalRecv;
17658 delete [] renumbSend;
17659 delete [] renumbRecv;
17660 delete [] nElem_Recv;
17661 delete [] nElem_Send;
17662 delete [] nElem_Flag;
17663 delete [] Local_Halo;
17664 delete [] Buffer_Recv_nAddedPeriodic;
17665 delete [] Buffer_Send_AddedPeriodic;
17666 delete [] Buffer_Recv_AddedPeriodic;
17667 delete [] npoint_procs;
17668 delete [] starting_node;
17669 delete [] ending_node;
17670 delete [] nPoint_Linear_Elems;
17671 delete [] nPoint_Linear_Nodes;
17672 delete [] nPoint_Send;
17673 delete [] nPoint_Recv;
17682 unsigned short iVar;
17683 unsigned long iPoint, iExtIter = config->
GetInnerIter();
17688 ofstream restart_file;
17719 }
else if ((fem || disc_adj_fem) && (config->
GetWrt_Dynamic())) {
17726 restart_file.open(filename.c_str(), ios::out);
17727 restart_file.precision(15);
17728 restart_file <<
"\"PointID\"";
17729 for (iVar = 0; iVar < Variable_Names.size()-1; iVar++)
17730 restart_file <<
"\t\"" << Variable_Names[iVar] <<
"\"";
17731 restart_file <<
"\t\"" << Variable_Names[Variable_Names.size()-1] <<
"\"" << endl;
17732 restart_file.close();
17741 restart_file.open(filename.c_str(), ios::out | ios::app);
17742 restart_file.precision(15);
17746 unsigned long myPoint = 0, offset = 0, Global_Index;
17747 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
17748 if (
rank == iProcessor) {
17749 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) {
17753 Global_Index = iPoint + offset;
17758 if (Global_Index < nPoint_Restart) {
17762 restart_file << Global_Index <<
"\t";
17767 for (iVar = 0; iVar < nVar_Par; iVar++) {
17768 restart_file << scientific << Parallel_Data[iVar][iPoint] <<
"\t";
17770 restart_file <<
"\n";
17775 restart_file.flush();
17787 restart_file <<
"EXT_ITER= " << config->
GetInnerIter() + 1 << endl;
17793 restart_file <<
"DCD_DCL_VALUE= " << config->
GetdCD_dCL() << endl;
17794 restart_file <<
"DCMX_DCL_VALUE= " << config->
GetdCMx_dCL() << endl;
17795 restart_file <<
"DCMY_DCL_VALUE= " << config->
GetdCMy_dCL() << endl;
17796 restart_file <<
"DCMZ_DCL_VALUE= " << config->
GetdCMz_dCL() << endl;
17810 restart_file.close();
17819 unsigned long iPoint, iExtIter = config->
GetInnerIter();
17826 ofstream restart_file;
17829 su2double file_size = 0.0, StartTime, StopTime, UsedTime, Bandwidth;
17859 strcpy(fname, filename.c_str());
17867 int var_buf_size = 5;
17868 int var_buf[5] = {535532, nVar_Par, (int)nGlobalPoint_Sort, 1, 8};
17877 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++)
17878 for (iVar = 0; iVar < nVar_Par; iVar++)
17883 int Restart_ExtIter;
17914 StartTime = MPI_Wtime();
17920 fhw = fopen(fname,
"wb");
17930 fwrite(var_buf, var_buf_size,
sizeof(
int), fhw);
17931 file_size += (
su2double)var_buf_size*
sizeof(
int);
17937 for (iVar = 0; iVar < nVar_Par; iVar++) {
17945 fwrite(buf, nVar_Par*nParallel_Poin,
sizeof(
passivedouble), fhw);
17950 fwrite(&Restart_ExtIter, 1,
sizeof(
int), fhw);
17968 MPI_Datatype etype, filetype;
17979 MPI_Type_contiguous(nVar_Par*nParallel_Poin,
MPI_DOUBLE, &filetype);
17980 MPI_Type_commit(&filetype);
17988 MPI_MODE_CREATE|MPI_MODE_EXCL|MPI_MODE_WRONLY,
17989 MPI_INFO_NULL, &fhw);
17990 if (ierr != MPI_SUCCESS) {
17991 MPI_File_close(&fhw);
17993 MPI_File_delete(fname, MPI_INFO_NULL);
17995 MPI_MODE_CREATE|MPI_MODE_EXCL|MPI_MODE_WRONLY,
17996 MPI_INFO_NULL, &fhw);
18011 file_size += (
su2double)var_buf_size*
sizeof(
int);
18017 for (iVar = 0; iVar < nVar_Par; iVar++) {
18029 disp = (var_buf_size*
sizeof(int) + nVar_Par*
CGNS_STRING_SIZE*
sizeof(
char) +
18035 MPI_File_set_view(fhw, disp, etype, filetype, (
char*)
"native", MPI_INFO_NULL);
18039 MPI_File_write_all(fhw, buf, nVar_Par*nParallel_Poin,
MPI_DOUBLE, &status);
18044 MPI_Type_free(&filetype);
18048 MPI_File_set_view(fhw, 0, MPI_BYTE, MPI_BYTE, (
char*)
"native", MPI_INFO_NULL);
18056 disp = (var_buf_size*
sizeof(int) + nVar_Par*
CGNS_STRING_SIZE*
sizeof(
char) +
18063 disp = (var_buf_size*
sizeof(int) + nVar_Par*
CGNS_STRING_SIZE*
sizeof(
char) +
18064 nVar_Par*nGlobalPoint_Sort*
sizeof(
passivedouble) + 1*
sizeof(
int));
18072 MPI_File_close(&fhw);
18081 StopTime = MPI_Wtime();
18083 UsedTime = StopTime-StartTime;
18095 Bandwidth = file_size/(1.0e6)/UsedTime;
18099 cout <<
"Wrote " << file_size/1.0e6 <<
" MB to disk in ";
18100 cout << UsedTime <<
" s. (" << Bandwidth <<
" MB/s)." << endl;
18110 CSolver *FlowSolver,
unsigned long iExtIter,
18111 unsigned short val_iZone,
unsigned short val_direction) {
18119 int DIRECTION = (int)val_direction;
18125 unsigned short iVar;
18126 unsigned long iPoint, iVertex, Global_Index;
18137 int *Local_Halo =
new int[geometry->
GetnPoint()];
18138 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
18141 for (
unsigned short iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
18147 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
18151 if (isPeriodic) Local_Halo[iPoint] =
false;
18158 unsigned long nTotalPoint;
18159 unsigned long nLocalPoint = 0;
18160 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
18161 if (Local_Halo[iPoint] ==
false)
18168 nTotalPoint = nLocalPoint;
18171 unsigned long *npoint_procs =
new unsigned long[nProcessor];
18172 unsigned long *nPoint_Linear =
new unsigned long[nProcessor+1];
18174 unsigned long total_pt_accounted = 0;
18175 for (
int ii = 0; ii < nProcessor; ii++) {
18176 npoint_procs[ii] = nTotalPoint/nProcessor;
18177 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
18182 unsigned long rem_points = nTotalPoint-total_pt_accounted;
18183 for (
unsigned long ii = 0; ii < rem_points; ii++) {
18184 npoint_procs[ii]++;
18189 nPoint_Linear[0] = 0;
18190 for (
int ii = 1; ii < nProcessor; ii++) {
18191 nPoint_Linear[ii] = nPoint_Linear[ii-1] + npoint_procs[ii-1];
18193 nPoint_Linear[nProcessor] = nTotalPoint;
18195 unsigned long Buffer_Send_nVertex[1], *Buffer_Recv_nVertex = NULL;
18196 unsigned long nLocalVertex_Surface = 0;
18197 unsigned long MaxLocalVertex_Surface = 0;
18203 nLocalVertex_Surface = 0;
18204 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) {
18208 Global_Index = iPoint + nPoint_Linear[
rank];
18213 if (Global_Index < geometry->GetGlobal_nPointDomain()) {
18214 if ((Parallel_Data[DIRECTION][iPoint] > coordMin) &&
18215 (Parallel_Data[DIRECTION][iPoint] < coordMax)) {
18216 nLocalVertex_Surface++;
18224 Buffer_Send_nVertex[0] = nLocalVertex_Surface;
18225 if (rank ==
MASTER_NODE) Buffer_Recv_nVertex =
new unsigned long [nProcessor];
18231 MaxLocalVertex_Surface = nLocalVertex_Surface;
18232 Buffer_Recv_nVertex[0] = Buffer_Send_nVertex[0];
18240 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long [MaxLocalVertex_Surface];
18241 unsigned long *Buffer_Recv_GlobalIndex = NULL;
18246 Buffer_Recv_Data =
new su2double [nProcessor*MaxLocalVertex_Surface*nVar_Par];
18247 Buffer_Recv_GlobalIndex =
new unsigned long [nProcessor*MaxLocalVertex_Surface];
18254 nLocalVertex_Surface = 0;
18255 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) {
18259 Global_Index = iPoint + nPoint_Linear[
rank];
18264 if (Global_Index < geometry->GetGlobal_nPointDomain()) {
18265 if ((Parallel_Data[DIRECTION][iPoint] > coordMin) &&
18266 (Parallel_Data[DIRECTION][iPoint] < coordMax)) {
18267 Buffer_Send_GlobalIndex[nLocalVertex_Surface] = Global_Index;
18268 for (iVar = 0; iVar < nVar_Par; iVar++) {
18269 Buffer_Send_Data[nLocalVertex_Surface*nVar_Par+iVar] = Parallel_Data[iVar][iPoint];
18271 nLocalVertex_Surface++;
18282 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[0]; iVertex++) {
18283 Buffer_Recv_GlobalIndex[iVertex] = Buffer_Send_GlobalIndex[iVertex];
18284 for (iVar = 0; iVar < nVar_Par; iVar++) {
18285 Buffer_Recv_Data[iVertex*nVar_Par+iVar] = Buffer_Send_Data[iVertex*nVar_Par+iVar];
18296 string filename =
"slice";
18297 if (DIRECTION == 0) {
18298 SPRINTF (buffer,
"_vert.csv");
18299 }
else if (DIRECTION == 1) {
18300 SPRINTF (buffer,
"_hori.csv");
18302 ofstream SurfFlow_file;
18305 strcpy (cstr, filename.c_str());
18306 strcat (cstr, buffer);
18307 SurfFlow_file.precision(15);
18308 SurfFlow_file.open(cstr, ios::out);
18312 SurfFlow_file <<
"\"Global_Index\",";
18313 for (iVar = 0; iVar < Variable_Names.size()-1; iVar++) {
18314 SurfFlow_file <<
"\"" << Variable_Names[iVar] <<
"\",";
18316 SurfFlow_file <<
"\"" << Variable_Names[Variable_Names.size()-1] <<
"\"" << endl;
18320 unsigned long Total_Index;
18321 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
18322 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
18326 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
18327 Global_Index = Buffer_Recv_GlobalIndex[Total_Index];
18331 SurfFlow_file << scientific << Global_Index;
18332 Total_Index = iProcessor*MaxLocalVertex_Surface*nVar_Par+iVertex*nVar_Par;
18333 for (iVar = 0; iVar < nVar_Par; iVar++) {
18334 SurfFlow_file << scientific <<
", " << Buffer_Recv_Data[Total_Index+iVar];
18336 SurfFlow_file << endl;
18343 SurfFlow_file.close();
18347 delete [] Buffer_Recv_Data;
18348 delete [] Buffer_Recv_GlobalIndex;
18349 delete [] Buffer_Recv_nVertex;
18355 delete [] Buffer_Send_Data;
18356 delete [] Buffer_Send_GlobalIndex;
18365 if (Conn_BoundLine_Par != NULL)
delete [] Conn_BoundLine_Par;
18366 if (Conn_BoundTria_Par != NULL)
delete [] Conn_BoundTria_Par;
18367 if (Conn_BoundQuad_Par != NULL)
delete [] Conn_BoundQuad_Par;
18370 if (Conn_Tria_Par != NULL)
delete [] Conn_Tria_Par;
18371 if (Conn_Quad_Par != NULL)
delete [] Conn_Quad_Par;
18372 if (Conn_Tetr_Par != NULL)
delete [] Conn_Tetr_Par;
18373 if (Conn_Hexa_Par != NULL)
delete [] Conn_Hexa_Par;
18374 if (Conn_Pris_Par != NULL)
delete [] Conn_Pris_Par;
18375 if (Conn_Pyra_Par != NULL)
delete [] Conn_Pyra_Par;
18384 for (
unsigned short iVar = 0; iVar < nVar_Par; iVar++) {
18385 if (Parallel_Data[iVar] != NULL)
delete [] Parallel_Data[iVar];
18387 if (Parallel_Data != NULL)
delete [] Parallel_Data;
18391 if (Local_Halo_Sort != NULL)
delete [] Local_Halo_Sort;
18393 if (beg_node != NULL)
delete [] beg_node;
18394 if (end_node != NULL)
delete [] end_node;
18396 if (nPointLinear != NULL)
delete [] nPointLinear;
18397 if (nPointCumulative != NULL)
delete [] nPointCumulative;
18405 for (
unsigned short iVar = 0; iVar < nVar_Par; iVar++) {
18406 if (Parallel_Surf_Data[iVar] != NULL)
delete [] Parallel_Surf_Data[iVar];
18408 if (Parallel_Surf_Data != NULL)
delete [] Parallel_Surf_Data;
18414 unsigned short iDim, iMarker, iMarker_Analyze;
18415 unsigned long iVertex, iPoint;
18416 su2double Mach = 0.0, Pressure, Temperature = 0.0, TotalPressure = 0.0, TotalTemperature = 0.0,
18417 Enthalpy, Velocity[3], TangVel[3], Velocity2, MassFlow, Density, Area,
18418 AxiFactor = 1.0, SoundSpeed, Vn, Vn2, Vtang2, Weight = 1.0;
18423 unsigned short nDim = geometry->
GetnDim();
18452 for (iMarker = 0; iMarker < nMarker; iMarker++) {
18454 Surface_MassFlow[iMarker] = 0.0;
18455 Surface_Mach[iMarker] = 0.0;
18456 Surface_Temperature[iMarker] = 0.0;
18457 Surface_Density[iMarker] = 0.0;
18458 Surface_Enthalpy[iMarker] = 0.0;
18459 Surface_NormalVelocity[iMarker] = 0.0;
18460 Surface_StreamVelocity2[iMarker] = 0.0;
18461 Surface_TransvVelocity2[iMarker] = 0.0;
18462 Surface_Pressure[iMarker] = 0.0;
18463 Surface_TotalTemperature[iMarker] = 0.0;
18464 Surface_TotalPressure[iMarker] = 0.0;
18465 Surface_VelocityIdeal[iMarker] = 0.0;
18466 Surface_Area[iMarker] = 0.0;
18467 Surface_MassFlow_Abs[iMarker] = 0.0;
18471 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
18478 if (axisymmetric) {
18488 Velocity2 = 0.0; Area = 0.0; MassFlow = 0.0; Vn = 0.0; Vtang2 = 0.0;
18490 for (iDim = 0; iDim < nDim; iDim++) {
18491 Area += (Vector[iDim] * AxiFactor) * (Vector[iDim] * AxiFactor);
18493 Velocity2 += Velocity[iDim] * Velocity[iDim];
18494 Vn += Velocity[iDim] * Vector[iDim] * AxiFactor;
18495 MassFlow += Vector[iDim] * AxiFactor * Density * Velocity[iDim];
18498 Area = sqrt (Area);
18499 if (AxiFactor == 0.0) Vn = 0.0;
else Vn /= Area;
18504 for (iDim = 0; iDim < nDim; iDim++) {
18505 TangVel[iDim] = Velocity[iDim] - Vn*Vector[iDim]*AxiFactor/Area;
18506 Vtang2 += TangVel[iDim]*TangVel[iDim];
18509 if (incompressible){
18520 TotalPressure = Pressure + 0.5*Density*Velocity2;
18523 Mach = sqrt(Velocity2)/SoundSpeed;
18524 Temperature = Pressure / (Gas_Constant * Density);
18526 TotalTemperature = Temperature * (1.0 + Mach * Mach * 0.5 * (Gamma - 1.0));
18527 TotalPressure = Pressure * pow( 1.0 + Mach * Mach * 0.5 * (Gamma - 1.0), Gamma / (Gamma - 1.0));
18532 Surface_Area[iMarker] += Area;
18533 Surface_MassFlow[iMarker] += MassFlow;
18534 Surface_MassFlow_Abs[iMarker] += abs(MassFlow);
18537 else if (Kind_Average ==
AVERAGE_AREA) Weight = abs(Area);
18540 Surface_Mach[iMarker] += Mach*Weight;
18541 Surface_Temperature[iMarker] += Temperature*Weight;
18542 Surface_Density[iMarker] += Density*Weight;
18543 Surface_Enthalpy[iMarker] += Enthalpy*Weight;
18544 Surface_NormalVelocity[iMarker] += Vn*Weight;
18545 Surface_Pressure[iMarker] += Pressure*Weight;
18546 Surface_TotalTemperature[iMarker] += TotalTemperature*Weight;
18547 Surface_TotalPressure[iMarker] += TotalPressure*Weight;
18551 Weight = abs(Area);
18553 Surface_StreamVelocity2[iMarker] += Vn2*Weight;
18554 Surface_TransvVelocity2[iMarker] += Vtang2*Weight;
18595 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
18596 Surface_MassFlow_Local[iMarker_Analyze] = 0.0;
18597 Surface_Mach_Local[iMarker_Analyze] = 0.0;
18598 Surface_Temperature_Local[iMarker_Analyze] = 0.0;
18599 Surface_Density_Local[iMarker_Analyze] = 0.0;
18600 Surface_Enthalpy_Local[iMarker_Analyze] = 0.0;
18601 Surface_NormalVelocity_Local[iMarker_Analyze] = 0.0;
18602 Surface_StreamVelocity2_Local[iMarker_Analyze] = 0.0;
18603 Surface_TransvVelocity2_Local[iMarker_Analyze] = 0.0;
18604 Surface_Pressure_Local[iMarker_Analyze] = 0.0;
18605 Surface_TotalTemperature_Local[iMarker_Analyze] = 0.0;
18606 Surface_TotalPressure_Local[iMarker_Analyze] = 0.0;
18607 Surface_Area_Local[iMarker_Analyze] = 0.0;
18608 Surface_MassFlow_Abs_Local[iMarker_Analyze] = 0.0;
18610 Surface_MassFlow_Total[iMarker_Analyze] = 0.0;
18611 Surface_Mach_Total[iMarker_Analyze] = 0.0;
18612 Surface_Temperature_Total[iMarker_Analyze] = 0.0;
18613 Surface_Density_Total[iMarker_Analyze] = 0.0;
18614 Surface_Enthalpy_Total[iMarker_Analyze] = 0.0;
18615 Surface_NormalVelocity_Total[iMarker_Analyze] = 0.0;
18616 Surface_StreamVelocity2_Total[iMarker_Analyze] = 0.0;
18617 Surface_TransvVelocity2_Total[iMarker_Analyze] = 0.0;
18618 Surface_Pressure_Total[iMarker_Analyze] = 0.0;
18619 Surface_TotalTemperature_Total[iMarker_Analyze] = 0.0;
18620 Surface_TotalPressure_Total[iMarker_Analyze] = 0.0;
18621 Surface_Area_Total[iMarker_Analyze] = 0.0;
18622 Surface_MassFlow_Abs_Total[iMarker_Analyze] = 0.0;
18624 Surface_MomentumDistortion_Total[iMarker_Analyze] = 0.0;
18630 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
18634 for (iMarker_Analyze= 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
18639 Surface_MassFlow_Local[iMarker_Analyze] += Surface_MassFlow[iMarker];
18640 Surface_Mach_Local[iMarker_Analyze] += Surface_Mach[iMarker];
18641 Surface_Temperature_Local[iMarker_Analyze] += Surface_Temperature[iMarker];
18642 Surface_Density_Local[iMarker_Analyze] += Surface_Density[iMarker];
18643 Surface_Enthalpy_Local[iMarker_Analyze] += Surface_Enthalpy[iMarker];
18644 Surface_NormalVelocity_Local[iMarker_Analyze] += Surface_NormalVelocity[iMarker];
18645 Surface_StreamVelocity2_Local[iMarker_Analyze] += Surface_StreamVelocity2[iMarker];
18646 Surface_TransvVelocity2_Local[iMarker_Analyze] += Surface_TransvVelocity2[iMarker];
18647 Surface_Pressure_Local[iMarker_Analyze] += Surface_Pressure[iMarker];
18648 Surface_TotalTemperature_Local[iMarker_Analyze] += Surface_TotalTemperature[iMarker];
18649 Surface_TotalPressure_Local[iMarker_Analyze] += Surface_TotalPressure[iMarker];
18650 Surface_Area_Local[iMarker_Analyze] += Surface_Area[iMarker];
18651 Surface_MassFlow_Abs_Local[iMarker_Analyze] += Surface_MassFlow_Abs[iMarker];
18678 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
18679 Surface_MassFlow_Total[iMarker_Analyze] = Surface_MassFlow_Local[iMarker_Analyze];
18680 Surface_Mach_Total[iMarker_Analyze] = Surface_Mach_Local[iMarker_Analyze];
18681 Surface_Temperature_Total[iMarker_Analyze] = Surface_Temperature_Local[iMarker_Analyze];
18682 Surface_Density_Total[iMarker_Analyze] = Surface_Density_Local[iMarker_Analyze];
18683 Surface_Enthalpy_Total[iMarker_Analyze] = Surface_Enthalpy_Local[iMarker_Analyze];
18684 Surface_NormalVelocity_Total[iMarker_Analyze] = Surface_NormalVelocity_Local[iMarker_Analyze];
18685 Surface_StreamVelocity2_Total[iMarker_Analyze] = Surface_StreamVelocity2_Local[iMarker_Analyze];
18686 Surface_TransvVelocity2_Total[iMarker_Analyze] = Surface_TransvVelocity2_Local[iMarker_Analyze];
18687 Surface_Pressure_Total[iMarker_Analyze] = Surface_Pressure_Local[iMarker_Analyze];
18688 Surface_TotalTemperature_Total[iMarker_Analyze] = Surface_TotalTemperature_Local[iMarker_Analyze];
18689 Surface_TotalPressure_Total[iMarker_Analyze] = Surface_TotalPressure_Local[iMarker_Analyze];
18690 Surface_Area_Total[iMarker_Analyze] = Surface_Area_Local[iMarker_Analyze];
18691 Surface_MassFlow_Abs_Total[iMarker_Analyze] = Surface_MassFlow_Abs_Local[iMarker_Analyze];
18699 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
18701 if (Kind_Average ==
AVERAGE_MASSFLUX) Weight = Surface_MassFlow_Abs_Total[iMarker_Analyze];
18702 else if (Kind_Average ==
AVERAGE_AREA) Weight = abs(Surface_Area_Total[iMarker_Analyze]);
18705 if (Weight != 0.0) {
18706 Surface_Mach_Total[iMarker_Analyze] /= Weight;
18707 Surface_Temperature_Total[iMarker_Analyze] /= Weight;
18708 Surface_Density_Total[iMarker_Analyze] /= Weight;
18709 Surface_Enthalpy_Total[iMarker_Analyze] /= Weight;
18710 Surface_NormalVelocity_Total[iMarker_Analyze] /= Weight;
18711 Surface_Pressure_Total[iMarker_Analyze] /= Weight;
18712 Surface_TotalTemperature_Total[iMarker_Analyze] /= Weight;
18713 Surface_TotalPressure_Total[iMarker_Analyze] /= Weight;
18716 Surface_Mach_Total[iMarker_Analyze] = 0.0;
18717 Surface_Temperature_Total[iMarker_Analyze] = 0.0;
18718 Surface_Density_Total[iMarker_Analyze] = 0.0;
18719 Surface_Enthalpy_Total[iMarker_Analyze] = 0.0;
18720 Surface_NormalVelocity_Total[iMarker_Analyze] = 0.0;
18721 Surface_Pressure_Total[iMarker_Analyze] = 0.0;
18722 Surface_TotalTemperature_Total[iMarker_Analyze] = 0.0;
18723 Surface_TotalPressure_Total[iMarker_Analyze] = 0.0;
18728 Area = fabs(Surface_Area_Total[iMarker_Analyze]);
18731 Surface_MomentumDistortion_Total[iMarker_Analyze] = Surface_StreamVelocity2_Total[iMarker_Analyze]/(Surface_NormalVelocity_Total[iMarker_Analyze]*Surface_NormalVelocity_Total[iMarker_Analyze]*Area) - 1.0;
18732 Surface_StreamVelocity2_Total[iMarker_Analyze] /= Area;
18733 Surface_TransvVelocity2_Total[iMarker_Analyze] /= Area;
18736 Surface_MomentumDistortion_Total[iMarker_Analyze] = 0.0;
18737 Surface_StreamVelocity2_Total[iMarker_Analyze] = 0.0;
18738 Surface_TransvVelocity2_Total[iMarker_Analyze] = 0.0;
18743 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
18749 su2double Mach = Surface_Mach_Total[iMarker_Analyze];
18761 su2double Enthalpy = Surface_Enthalpy_Total[iMarker_Analyze];
18773 su2double MomentumDistortion = Surface_MomentumDistortion_Total[iMarker_Analyze];
18776 su2double SecondOverUniform = SecondaryStrength/Uniformity;
18794 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
18795 if (nMarker_Analyze == 2) {
18806 cout.setf(ios::scientific, ios::floatfield);
18807 cout << endl <<
"Computing surface mean values." << endl << endl;
18809 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
18812 if (nDim == 3) {
if (config->
GetSystemMeasurements() ==
SI) cout << setw(20) <<
"Area (m^2): ";
else cout << setw(20) <<
"Area (ft^2): "; }
18813 else {
if (config->
GetSystemMeasurements() ==
SI) cout << setw(20) <<
"Area (m): ";
else cout << setw(20) <<
"Area (ft): "; }
18816 else if (config->
GetSystemMeasurements() ==
US) cout << setw(15) << fabs(Surface_Area_Total[iMarker_Analyze])*12.0*12.0;
18826 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"Vn (ft/s): " << setw(15) << NormalVelocity;
18831 if (config->
GetSystemMeasurements() ==
SI) cout << setw(20) <<
"Uniformity (m/s): " << setw(15) << Uniformity;
18832 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"Uniformity (ft/s): " << setw(15) << Uniformity;
18835 if (config->
GetSystemMeasurements() ==
SI) cout << setw(20) <<
"Secondary (m/s): " << setw(15) << SecondaryStrength;
18836 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"Secondary (ft/s): " << setw(15) << SecondaryStrength;
18841 cout << setw(20) <<
"Mom. Distortion: " << setw(15) << MomentumDistortion;
18844 cout << setw(20) <<
"Second/Uniform: " << setw(15) << SecondOverUniform;
18854 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"PT (psf): " << setw(15) <<TotalPressure;
18859 cout << setw(20) <<
"Mach: " << setw(15) << Mach;
18863 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"Rho (lb/ft^3): " << setw(15) << Density*32.174;
18867 if (compressible || energy) {
18874 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"TT (R): " << setw(15) << TotalTemperature;
18880 cout.unsetf(ios_base::floatfield);
18884 delete [] Surface_MassFlow_Local;
18885 delete [] Surface_Mach_Local;
18886 delete [] Surface_Temperature_Local;
18887 delete [] Surface_Density_Local;
18888 delete [] Surface_Enthalpy_Local;
18889 delete [] Surface_NormalVelocity_Local;
18890 delete [] Surface_Pressure_Local;
18891 delete [] Surface_TotalTemperature_Local;
18892 delete [] Surface_TotalPressure_Local;
18893 delete [] Surface_Area_Local;
18894 delete [] Surface_MassFlow_Abs_Local;
18896 delete [] Surface_MassFlow_Total;
18897 delete [] Surface_Mach_Total;
18898 delete [] Surface_Temperature_Total;
18899 delete [] Surface_Density_Total;
18900 delete [] Surface_Enthalpy_Total;
18901 delete [] Surface_NormalVelocity_Total;
18902 delete [] Surface_Pressure_Total;
18903 delete [] Surface_TotalTemperature_Total;
18904 delete [] Surface_TotalPressure_Total;
18905 delete [] Surface_Area_Total;
18906 delete [] Surface_MassFlow_Abs_Total;
18908 delete [] Surface_MassFlow;
18909 delete [] Surface_Mach;
18910 delete [] Surface_Temperature;
18911 delete [] Surface_Density;
18912 delete [] Surface_Enthalpy;
18913 delete [] Surface_NormalVelocity;
18914 delete [] Surface_Pressure;
18915 delete [] Surface_TotalTemperature;
18916 delete [] Surface_TotalPressure;
18917 delete [] Surface_Area;
18919 delete [] Surface_VelocityIdeal;
18920 delete [] Surface_MassFlow_Abs;
18940 cout <<
"Merging volumetric triangle grid connectivity." << endl;
18944 cout <<
"Merging volumetric quadrilateral grid connectivity." << endl;
18948 cout <<
"Merging volumetric tetrahedron grid connectivity." << endl;
18952 cout <<
"Merging volumetric hexahedron grid connectivity." << endl;
18956 cout <<
"Merging volumetric prism grid connectivity." << endl;
18960 cout <<
"Merging volumetric pyramid grid connectivity." << endl;
18970 cout <<
"Merging surface line grid connectivity." << endl;
18974 cout <<
"Merging surface triangle grid connectivity." << endl;
18978 cout <<
"Merging surface quadrilateral grid connectivity." << endl;
18985 nGlobal_Elem = nGlobal_Tria + nGlobal_Quad + nGlobal_Tetr +
18986 nGlobal_Hexa + nGlobal_Pyra + nGlobal_Pris;
18990 nSurf_Elem = nGlobal_Line + nGlobal_BoundTria + nGlobal_BoundQuad;
18998 unsigned short iDim;
18999 unsigned long iPoint;
19005 unsigned short nDim = DGGeometry->
GetnDim();
19011 vector<su2double> DOFsCoords;
19012 vector<unsigned long> globalID;
19016 unsigned long nLocalPoint = 0;
19017 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
19018 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
19021 globalID.push_back(globalIndex);
19024 for(
unsigned short k=0; k<nDim; ++k) DOFsCoords.push_back(coor[k]);
19037 nGlobal_Poin = nLocalPoint;
19038 nGlobal_Doma = nLocalPoint;
19043 for (iDim = 0; iDim < nDim; iDim++) {
19044 Coords[iDim] =
new su2double[nGlobal_Poin];
19049 for (iPoint = 0; iPoint < nLocalPoint; iPoint++) {
19056 unsigned long iGlobal_Index = globalID[iPoint];
19058 for (iDim = 0; iDim < nDim; iDim++) {
19059 Coords[iDim][iGlobal_Index] = DOFsCoords[iPoint*nDim+iDim];
19064 Coords[iDim][iGlobal_Index] *= 12.0;
19072 int iProcessor, nProcessor =
size;
19073 unsigned long jPoint;
19077 unsigned long Buffer_Send_nPoin[1], *Buffer_Recv_nPoin = NULL;
19078 unsigned long MaxLocalPoint = 0;
19079 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
19081 if (
rank ==
MASTER_NODE) Buffer_Recv_nPoin =
new unsigned long[nProcessor];
19089 Buffer_Send_nPoin[0] = nLocalPoint;
19099 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
19100 nGlobal_Doma += Buffer_Recv_nPoin[iProcessor];
19103 nBuffer_Scalar = MaxLocalPoint;
19113 su2double *Buffer_Send_Z = NULL, *Buffer_Recv_Z = NULL;
19114 if (nDim == 3) Buffer_Send_Z =
new su2double[MaxLocalPoint];
19116 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
19117 unsigned long *Buffer_Recv_GlobalIndex = NULL;
19123 Buffer_Recv_X =
new su2double[nProcessor*MaxLocalPoint];
19124 Buffer_Recv_Y =
new su2double[nProcessor*MaxLocalPoint];
19125 if (nDim == 3) Buffer_Recv_Z =
new su2double[nProcessor*MaxLocalPoint];
19126 Buffer_Recv_GlobalIndex =
new unsigned long[nProcessor*MaxLocalPoint];
19130 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
19131 nGlobal_Poin += Buffer_Recv_nPoin[iProcessor];
19134 for (iDim = 0; iDim < nDim; iDim++) {
19135 Coords[iDim] =
new su2double[nGlobal_Poin];
19146 for (iPoint = 0; iPoint < nLocalPoint; iPoint++) {
19152 Buffer_Send_X[jPoint] = DOFsCoords[iPoint*nDim+0];
19153 Buffer_Send_Y[jPoint] = DOFsCoords[iPoint*nDim+1];
19154 if (nDim == 3) Buffer_Send_Z[jPoint] = DOFsCoords[iPoint*nDim+2];
19159 Buffer_Send_X[jPoint] *= 12.0;
19160 Buffer_Send_Y[jPoint] *= 12.0;
19161 if (nDim == 3) Buffer_Send_Z[jPoint] *= 12.0;
19165 Buffer_Send_GlobalIndex[jPoint] = globalID[iPoint];
19186 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
19187 for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
19189 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
19190 if (iGlobal_Index >= nGlobal_Poin){
19191 cout << iGlobal_Index <<
" " << nGlobal_Poin << endl;
19193 Coords[0][iGlobal_Index] = Buffer_Recv_X[jPoint];
19194 Coords[1][iGlobal_Index] = Buffer_Recv_Y[jPoint];
19195 if (nDim == 3) Coords[2][iGlobal_Index] = Buffer_Recv_Z[jPoint];
19199 jPoint = (iProcessor+1)*nBuffer_Scalar;
19206 delete [] Buffer_Send_X;
19207 delete [] Buffer_Send_Y;
19208 if (Buffer_Send_Z != NULL)
delete [] Buffer_Send_Z;
19209 delete [] Buffer_Send_GlobalIndex;
19211 delete [] Buffer_Recv_X;
19212 delete [] Buffer_Recv_Y;
19213 if (Buffer_Recv_Z != NULL)
delete [] Buffer_Recv_Z;
19214 delete [] Buffer_Recv_GlobalIndex;
19215 delete [] Buffer_Recv_nPoin;
19225 unsigned short NODES_PER_ELEMENT = 0;
19226 unsigned long iNode, jNode;
19227 unsigned long iElem = 0;
19228 unsigned long nLocalElem = 0, nElem_Total = 0;
19230 unsigned long jElem;
19232 unsigned long Buffer_Send_nElem[1], *Buffer_Recv_nElem = NULL;
19233 unsigned long nBuffer_Scalar = 0;
19234 unsigned long kNode = 0, kElem = 0;
19235 unsigned long MaxLocalElem = 0;
19238 bool *Write_Elem = NULL;
19240 int *Conn_Elem = NULL;
19253 vector<unsigned long> volumeConn;
19256 map<unsigned long, unsigned long> mapLocal2Global;
19257 unsigned long ii = 0;
19258 for(
unsigned long i=0; i<nVolElemOwned; ++i) {
19259 for(
unsigned short j=0; j<volElem[i].
nDOFsSol; ++j, ++ii) {
19266 for(
unsigned long i=0; i<nVolElemOwned; ++i) {
19272 const unsigned short VTK_Type1 = standardElementsSol[ind].
GetVTK_Type1();
19273 const unsigned short VTK_Type2 = standardElementsSol[ind].
GetVTK_Type2();
19277 if (Elem_Type == VTK_Type1) {
19280 const unsigned short nDOFsPerSubElem = standardElementsSol[ind].
GetNDOFsPerSubElem(VTK_Type1);
19281 const unsigned short *connSubElems = standardElementsSol[ind].
GetSubConnType1();
19284 unsigned short kk = 0;
19285 for(
unsigned short j=0; j<nSubElems; ++j) {
19288 for(
unsigned short k=0; k<nDOFsPerSubElem; ++k, ++kk)
19289 volumeConn.push_back(mapLocal2Global[volElem[i].
offsetDOFsSolLocal+connSubElems[kk]]);
19294 }
else if (Elem_Type == VTK_Type2) {
19297 const unsigned short nDOFsPerSubElem = standardElementsSol[ind].
GetNDOFsPerSubElem(VTK_Type2);
19298 const unsigned short *connSubElems = standardElementsSol[ind].
GetSubConnType2();
19301 unsigned short kk = 0;
19302 for(
unsigned short j=0; j<nSubElems; ++j) {
19305 for(
unsigned short k=0; k<nDOFsPerSubElem; ++k, ++kk)
19306 volumeConn.push_back(mapLocal2Global[volElem[i].
offsetDOFsSolLocal+connSubElems[kk]]);
19318 switch (Elem_Type) {
19344 Buffer_Send_nElem[0] = nLocalElem;
19351 MaxLocalElem = nLocalElem;
19352 Buffer_Recv_nElem[0] = Buffer_Send_nElem[0];
19355 nBuffer_Scalar = MaxLocalElem*NODES_PER_ELEMENT;
19359 unsigned long *Buffer_Send_Elem =
new unsigned long[nBuffer_Scalar];
19360 unsigned long *Buffer_Recv_Elem = NULL;
19362 unsigned short *Buffer_Send_Halo =
new unsigned short[MaxLocalElem];
19363 unsigned short *Buffer_Recv_Halo = NULL;
19368 Buffer_Recv_Elem =
new unsigned long[
size*nBuffer_Scalar];
19369 Buffer_Recv_Halo =
new unsigned short[
size*MaxLocalElem];
19370 if (MaxLocalElem > 0) Conn_Elem =
new int[
size*MaxLocalElem*NODES_PER_ELEMENT];
19378 for (iElem = 0; iElem < nLocalElem; iElem++) {
19382 Buffer_Send_Halo[iElem] =
false;
19383 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
19387 Buffer_Send_Elem[jNode] = volumeConn[iElem*NODES_PER_ELEMENT+iNode];
19402 for (
unsigned long iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Elem[iPoint] = Buffer_Send_Elem[iPoint];
19403 for (
unsigned long iPoint = 0; iPoint < MaxLocalElem; iPoint++) Buffer_Recv_Halo[iPoint] = Buffer_Send_Halo[iPoint];
19414 Write_Elem =
new bool[
size*MaxLocalElem];
19415 for (iElem = 0; iElem <
size*MaxLocalElem; iElem++) {
19416 Write_Elem[iElem] =
true;
19427 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
19428 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
19431 if (Buffer_Recv_Halo[kElem+iElem])
19432 Write_Elem[kElem+iElem] =
false;
19435 kElem = (iProcessor+1)*MaxLocalElem;
19441 jNode = 0; kNode = 0; jElem = 0; nElem_Total = 0;
19442 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
19443 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
19446 if (Write_Elem[jElem+iElem]) {
19455 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
19456 Conn_Elem[kNode] = (int)Buffer_Recv_Elem[jNode+iElem*NODES_PER_ELEMENT+iNode] + 1;
19462 jElem = (iProcessor+1)*MaxLocalElem;
19463 jNode = (iProcessor+1)*nBuffer_Scalar;
19468 delete [] Buffer_Send_Elem;
19469 delete [] Buffer_Send_Halo;
19471 delete [] Buffer_Recv_nElem;
19472 delete [] Buffer_Recv_Elem;
19473 delete [] Buffer_Recv_Halo;
19474 delete [] Write_Elem;
19481 switch (Elem_Type) {
19483 nGlobal_Tria = nElem_Total;
19484 if (nGlobal_Tria > 0) Conn_Tria = Conn_Elem;
19487 nGlobal_Quad = nElem_Total;
19488 if (nGlobal_Quad > 0) Conn_Quad = Conn_Elem;
19491 nGlobal_Tetr = nElem_Total;
19492 if (nGlobal_Tetr > 0) Conn_Tetr = Conn_Elem;
19495 nGlobal_Hexa = nElem_Total;
19496 if (nGlobal_Hexa > 0) Conn_Hexa = Conn_Elem;
19499 nGlobal_Pris = nElem_Total;
19500 if (nGlobal_Pris > 0) Conn_Pris = Conn_Elem;
19503 nGlobal_Pyra = nElem_Total;
19504 if (nGlobal_Pyra > 0) Conn_Pyra = Conn_Elem;
19515 unsigned short NODES_PER_ELEMENT = 0;
19517 unsigned long iNode, jNode;
19518 unsigned long iElem = 0;
19519 unsigned long nLocalElem = 0, nElem_Total = 0;
19522 unsigned long jElem;
19524 unsigned long Buffer_Send_nElem[1], *Buffer_Recv_nElem = NULL;
19525 unsigned long nBuffer_Scalar = 0;
19526 unsigned long kNode = 0, kElem = 0;
19527 unsigned long MaxLocalElem = 0;
19530 bool *Write_Elem = NULL;
19532 int *Conn_Elem = NULL;
19547 map<unsigned long, unsigned long> mapLocal2Global;
19548 unsigned long ii = 0;
19549 for(
unsigned long i=0; i<nVolElemOwned; ++i) {
19550 for(
unsigned short j=0; j<volElem[i].
nDOFsSol; ++j, ++ii) {
19556 vector<unsigned long> surfaceConn;
19562 for(
unsigned short iMarker=0; iMarker < config->
GetnMarker_All(); ++iMarker) {
19563 if( !boundaries[iMarker].periodicBoundary ) {
19569 const vector<CSurfaceElementFEM> &surfElem = boundaries[iMarker].
surfElem;
19570 for(
unsigned long i=0; i<surfElem.size(); ++i) {
19575 const unsigned short ind = surfElem[i].indStandardElement;
19576 const unsigned short VTK_Type = standardBoundaryFacesSol[ind].
GetVTK_Type();
19580 if (VTK_Type == Elem_Type) {
19582 const unsigned short nSubFaces = standardBoundaryFacesSol[ind].
GetNSubFaces();
19583 const unsigned short nDOFsPerFace = standardBoundaryFacesSol[ind].
GetNDOFsPerSubFace();
19584 const unsigned short *connSubFaces = standardBoundaryFacesSol[ind].
GetSubFaceConn();
19587 unsigned short ii = 0;
19588 for(
unsigned short j=0; j<nSubFaces; ++j) {
19591 for(
unsigned short k=0; k<nDOFsPerFace; ++k, ++ii)
19592 surfaceConn.push_back(mapLocal2Global[surfElem[i].DOFsSolFace[connSubFaces[ii]]]);
19602 switch (Elem_Type) {
19619 Buffer_Send_nElem[0] = nLocalElem;
19626 MaxLocalElem = nLocalElem;
19627 Buffer_Recv_nElem[0] = Buffer_Send_nElem[0];
19630 nBuffer_Scalar = MaxLocalElem*NODES_PER_ELEMENT;
19634 unsigned long *Buffer_Send_Elem =
new unsigned long[nBuffer_Scalar];
19635 unsigned long *Buffer_Recv_Elem = NULL;
19637 unsigned short *Buffer_Send_Halo =
new unsigned short[MaxLocalElem];
19638 unsigned short *Buffer_Recv_Halo = NULL;
19643 Buffer_Recv_Elem =
new unsigned long[
size*nBuffer_Scalar];
19644 Buffer_Recv_Halo =
new unsigned short[
size*MaxLocalElem];
19645 if (MaxLocalElem > 0) Conn_Elem =
new int[
size*MaxLocalElem*NODES_PER_ELEMENT];
19652 for (iElem = 0; iElem < nLocalElem; iElem++) {
19656 Buffer_Send_Halo[iElem] =
false;
19657 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
19660 Buffer_Send_Elem[jNode] = surfaceConn[iElem*NODES_PER_ELEMENT+iNode];
19673 for (
unsigned long iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Elem[iPoint] = Buffer_Send_Elem[iPoint];
19674 for (
unsigned long iPoint = 0; iPoint < MaxLocalElem; iPoint++) Buffer_Recv_Halo[iPoint] = Buffer_Send_Halo[iPoint];
19685 Write_Elem =
new bool[
size*MaxLocalElem];
19686 for (iElem = 0; iElem <
size*MaxLocalElem; iElem++) {
19687 Write_Elem[iElem] =
true;
19698 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
19699 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
19702 if (Buffer_Recv_Halo[kElem+iElem])
19703 Write_Elem[kElem+iElem] =
false;
19706 kElem = (iProcessor+1)*MaxLocalElem;
19712 jNode = 0; kNode = 0; jElem = 0; nElem_Total = 0;
19713 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
19714 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
19717 if (Write_Elem[jElem+iElem]) {
19726 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
19727 Conn_Elem[kNode] = (int)Buffer_Recv_Elem[jNode+iElem*NODES_PER_ELEMENT+iNode] + 1;
19733 jElem = (iProcessor+1)*MaxLocalElem;
19734 jNode = (iProcessor+1)*nBuffer_Scalar;
19739 delete [] Buffer_Send_Elem;
19740 delete [] Buffer_Send_Halo;
19742 delete [] Buffer_Recv_nElem;
19743 delete [] Buffer_Recv_Elem;
19744 delete [] Buffer_Recv_Halo;
19745 delete [] Write_Elem;
19752 switch (Elem_Type) {
19754 nGlobal_Line = nElem_Total;
19755 if (nGlobal_Line > 0) Conn_Line = Conn_Elem;
19758 nGlobal_BoundTria = nElem_Total;
19759 if (nGlobal_BoundTria > 0) Conn_BoundTria = Conn_Elem;
19762 nGlobal_BoundQuad = nElem_Total;
19763 if (nGlobal_BoundQuad > 0) Conn_BoundQuad = Conn_Elem;
19774 unsigned short iVar = 0, FirstIndex =
NONE, SecondIndex =
NONE, ThirdIndex =
NONE;
19775 unsigned short nVar_First = 0, nVar_Second = 0, nVar_Third = 0;
19777 unsigned long iPoint = 0, jPoint = 0;
19779 unsigned long Buffer_Send_nPoint[1], *Buffer_Recv_nPoint = NULL;
19780 unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
19781 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
19789 switch (Kind_Solver) {
19791 default: SecondIndex =
NONE; ThirdIndex =
NONE;
break;
19794 nVar_First = solver[FirstIndex]->
GetnVar();
19795 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
19796 if (ThirdIndex !=
NONE) nVar_Third = solver[ThirdIndex]->
GetnVar();
19797 nVar_Consv = nVar_First + nVar_Second + nVar_Third;
19798 nVar_Total = nVar_Consv;
19808 map<unsigned long, unsigned long> mapLocal2Global;
19809 vector<su2double> DOFsSol;
19810 vector<unsigned long> globalID;
19813 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
19821 unsigned int i = 0;
19822 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
19826 globalID.push_back(globalIndex);
19828 for(
unsigned short iVar=0; iVar<nVar_Consv; ++iVar, ++i) {
19829 DOFsSol.push_back(solDOFs[i]);
19833 Buffer_Send_nPoint[0] = nLocalPoint;
19843 MaxLocalPoint = nLocalPoint;
19844 Buffer_Recv_nPoint[0] = Buffer_Send_nPoint[0];
19847 nBuffer_Scalar = MaxLocalPoint;
19854 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
19855 unsigned long *Buffer_Recv_GlobalIndex = NULL;
19862 Buffer_Recv_GlobalIndex =
new unsigned long[
size*MaxLocalPoint];
19866 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
19867 nGlobal_Poin += Buffer_Recv_nPoint[iProcessor];
19870 for (iVar = 0; iVar < nVar_Total; iVar++) {
19871 Data[iVar] =
new su2double[nGlobal_Poin];
19881 for (iVar = 0; iVar < nVar_Consv; iVar++) {
19886 for (iPoint = 0; iPoint < nLocalPoint; iPoint++) {
19890 Buffer_Send_Var[jPoint] = DOFsSol[iPoint*nVar_Consv+iVar];
19895 Buffer_Send_GlobalIndex[jPoint] = globalID[iPoint];
19907 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
19914 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_GlobalIndex[iPoint] = Buffer_Send_GlobalIndex[iPoint];
19922 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
19923 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
19927 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
19929 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
19935 jPoint = (iProcessor+1)*nBuffer_Scalar;
19943 delete [] Buffer_Send_Var;
19944 delete [] Buffer_Send_GlobalIndex;
19946 delete [] Buffer_Recv_nPoint;
19947 delete [] Buffer_Recv_Var;
19948 delete [] Buffer_Recv_GlobalIndex;
19956 unsigned short iVar;
19957 unsigned long iPoint = 0, jPoint = 0;
19959 unsigned long Buffer_Send_nPoint[1], *Buffer_Recv_nPoint = NULL;
19960 unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
19961 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
19967 nVar_Total = config->
fields.size() - 1;
19977 vector<su2double> DOFsSol;
19978 vector<unsigned long> globalID;
19981 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
19989 unsigned int i = 0;
19990 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
19994 globalID.push_back(globalIndex);
19996 for(
unsigned short iVar=0; iVar<nVar_Total; ++iVar, ++i) {
19997 DOFsSol.push_back(solDOFs[i]);
20001 Buffer_Send_nPoint[0] = nLocalPoint;
20011 MaxLocalPoint = nLocalPoint;
20012 Buffer_Recv_nPoint[0] = Buffer_Send_nPoint[0];
20015 nBuffer_Scalar = MaxLocalPoint;
20022 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
20023 unsigned long *Buffer_Recv_GlobalIndex = NULL;
20030 Buffer_Recv_GlobalIndex =
new unsigned long[
size*MaxLocalPoint];
20034 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
20035 nGlobal_Poin += Buffer_Recv_nPoint[iProcessor];
20038 for (iVar = 0; iVar < nVar_Total; iVar++) {
20039 Data[iVar] =
new su2double[nGlobal_Poin];
20049 for (iVar = 0; iVar < nVar_Total; iVar++) {
20054 for (iPoint = 0; iPoint < nLocalPoint; iPoint++) {
20058 Buffer_Send_Var[jPoint] = DOFsSol[iPoint*nVar_Total+iVar];
20063 Buffer_Send_GlobalIndex[jPoint] = globalID[iPoint];
20075 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
20082 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_GlobalIndex[iPoint] = Buffer_Send_GlobalIndex[iPoint];
20090 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
20091 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
20095 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
20097 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
20103 jPoint = (iProcessor+1)*nBuffer_Scalar;
20111 delete [] Buffer_Send_Var;
20112 delete [] Buffer_Send_GlobalIndex;
20114 delete [] Buffer_Recv_nPoint;
20115 delete [] Buffer_Recv_Var;
20116 delete [] Buffer_Recv_GlobalIndex;
20122 unsigned long iExtIter,
unsigned short val_nZone) {
20124 unsigned short iZone;
20126 for (iZone = 0; iZone < val_nZone; iZone++) {
20130 if (config[iZone]->GetWrt_Output()) {
20145 if (Wrt_Vol || Wrt_Srf) {
20146 if (
rank ==
MASTER_NODE) cout << endl <<
"Merging connectivities in the Master node." << endl;
20154 if (
rank ==
MASTER_NODE) cout <<
"Merging coordinates in the Master node." << endl;
20159 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary volume and surface mesh files." << endl;
20167 if (
rank ==
MASTER_NODE) cout <<
"Merging solution in the Master node." << endl;
20168 MergeSolution_FEM(config[iZone], geometry[iZone][MESH_0], solver_container[iZone][MESH_0], iZone);
20178 if (
rank ==
MASTER_NODE) cout <<
"Writing SU2 native restart file." << endl;
20179 SetRestart(config[iZone], geometry[iZone][MESH_0], solver_container[iZone][MESH_0] , iZone);
20183 switch (FileFormat) {
20189 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file volume solution file." << endl;
20199 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary volume solution file." << endl;
20209 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII volume solution file." << endl;
20218 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary volume files not available in this mode." << endl;
20219 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII volume solution file instead." << endl;
20232 switch (FileFormat) {
20238 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII surface solution file." << endl;
20247 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary surface solution file." << endl;
20256 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII surface solution file." << endl;
20265 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary surface files not available in this mode." << endl;
20266 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII surface solution file instead." << endl;
20293 if (
rank ==
MASTER_NODE) cout << endl <<
"Restart and solution output disabled." << endl;
20299 unsigned long iExtIter,
unsigned short val_nZone) {
20301 unsigned short iZone, iInst, nInst;
20303 for (iZone = 0; iZone < val_nZone; iZone++) {
20307 for (iInst = 0; iInst < nInst; iInst++) {
20324 if ((Wrt_Vol || Wrt_Srf)) {
20325 if (
rank ==
MASTER_NODE) cout <<
"Merging connectivities in the Master node." << endl;
20331 if ((Wrt_Vol || Wrt_Srf)) {
20332 if (
rank ==
MASTER_NODE) cout <<
"Merging solution in the Master node." << endl;
20344 switch (FileFormat) {
20350 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file (volume grid)." << endl;
20360 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot Binary file (volume grid)." << endl;
20370 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII file (volume grid)." << endl;
20379 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary (volume grid) files not available in this mode." << endl;
20380 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII file instead." << endl;
20393 switch (FileFormat) {
20399 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file (surface grid)." << endl;
20408 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot Binary file (surface grid)." << endl;
20417 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII file (surface grid)." << endl;
20426 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary (surface grid) files not available in this mode." << endl;
20427 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII file instead." << endl;
20438 if (!wrote_base_file)
20440 if (!wrote_surf_file)
20444 if (Wrt_Vol || Wrt_Srf)
20460 unsigned short iDim;
20462 unsigned short nDim = geometry->
GetnDim();
20464 unsigned long iVar, jVar;
20465 unsigned long iPoint, jPoint, FirstIndex =
NONE, SecondIndex =
NONE;
20466 unsigned long nVar_First = 0, nVar_Second = 0, nVar_Consv_Par = 0;
20468 stringstream varname;
20473 switch (Kind_Solver) {
20476 default: SecondIndex =
NONE;
break;
20479 nVar_First = solver[FirstIndex]->
GetnVar();
20480 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
20481 nVar_Consv_Par = nVar_First + nVar_Second;
20495 nVar_Par = 1; Variable_Names.push_back(
"x");
20496 nVar_Par += 1; Variable_Names.push_back(
"y");
20497 if (geometry->
GetnDim() == 3) {
20498 nVar_Par += 1; Variable_Names.push_back(
"z");
20504 nVar_Par += nVar_Consv_Par;
20506 Variable_Names.push_back(
"Density");
20507 Variable_Names.push_back(
"X-Momentum");
20508 Variable_Names.push_back(
"Y-Momentum");
20509 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Z-Momentum");
20510 Variable_Names.push_back(
"Energy");
20518 Variable_Names.push_back(
"Pressure");
20521 Variable_Names.push_back(
"Temperature");
20523 Variable_Names.push_back(
"Pressure_Coefficient");
20525 Variable_Names.push_back(
"C<sub>p</sub>");
20527 Variable_Names.push_back(
"Mach");
20531 Variable_Names.push_back(
"Laminar_Viscosity");
20535 Variable_Names.push_back(
"Eddy_Viscosity");
20538 if (solver[
FLOW_SOL]->VerificationSolution) {
20539 if (solver[
FLOW_SOL]->VerificationSolution->ExactSolutionKnown()) {
20540 nVar_Par += 2*nVar_Consv_Par;
20541 Variable_Names.push_back(
"Verification_Density");
20542 Variable_Names.push_back(
"Verification_Momentum_x");
20543 Variable_Names.push_back(
"Verification_Momentum_y");
20544 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Verification_Momentum_z");
20545 Variable_Names.push_back(
"Verification_Energy");
20546 Variable_Names.push_back(
"Error_Density");
20547 Variable_Names.push_back(
"Error_Momentum_x");
20548 Variable_Names.push_back(
"Error_Momentum_y");
20549 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Error_Momentum_z");
20550 Variable_Names.push_back(
"Error_Energy");
20573 Local_Data =
new su2double*[nLocalPoint_Sort];
20574 for (iPoint = 0; iPoint < nLocalPoint_Sort; iPoint++) {
20575 Local_Data[iPoint] =
new su2double[nVar_Par];
20594 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
20601 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
20609 const su2double *U = solDOFs + j*nVar_First;
20614 for(
unsigned short k=0; k<nDim; ++k) {
20615 Local_Data[jPoint][iVar] = coor[k];
20621 for(jVar=0; jVar < nVar_First; ++jVar) {
20622 Local_Data[jPoint][iVar] = U[jVar];
20630 for(iDim=0; iDim<nDim; ++iDim) {
20631 vel[iDim] = U[iDim+1]*DensityInv;
20632 Velocity2 += vel[iDim]*vel[iDim];
20634 su2double StaticEnergy = U[nDim+1]*DensityInv - 0.5*Velocity2;
20639 Local_Data[jPoint][iVar] = DGFluidModel->
GetPressure(); iVar++;
20640 Local_Data[jPoint][iVar] = DGFluidModel->
GetTemperature(); iVar++;
20641 Local_Data[jPoint][iVar] = DGFluidModel->
GetCp(); iVar++;
20642 Local_Data[jPoint][iVar] = sqrt(Velocity2)/DGFluidModel->
GetSoundSpeed(); iVar++;
20652 if (solver[
FLOW_SOL]->VerificationSolution) {
20653 if (solver[
FLOW_SOL]->VerificationSolution->ExactSolutionKnown()) {
20662 for (jVar = 0; jVar < nVar_First; jVar++) {
20663 Local_Data[jPoint][iVar] = mmsSol[jVar];
20670 for (jVar = 0; jVar < nVar_First; jVar++) {
20671 Local_Data[jPoint][iVar] = error[jVar];
20692 unsigned long iPoint;
20697 bool fem_solver = ((KindSolver ==
FEM_EULER) ||
20704 nGlobalPoint_Sort = 0;
20705 nLocalPoint_Sort = 0;
20715 unsigned long iVertex;
20718 Local_Halo_Sort =
new int[geometry->
GetnPoint()];
20719 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
20720 Local_Halo_Sort[iPoint] = !geometry->
node[iPoint]->
GetDomain();
20722 for (
unsigned short iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
20728 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
20732 if (isPeriodic) Local_Halo_Sort[iPoint] =
false;
20739 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
20740 if (Local_Halo_Sort[iPoint] ==
false)
20741 nLocalPoint_Sort++;
20747 nGlobalPoint_Sort = nLocalPoint_Sort;
20768 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
20772 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
20773 nLocalPoint_Sort++;
20777 Local_Halo_Sort =
new int[nLocalPoint_Sort];
20778 for (iPoint = 0; iPoint < nLocalPoint_Sort; iPoint++)
20779 Local_Halo_Sort[iPoint] =
false;
20785 nGlobalPoint_Sort = nLocalPoint_Sort;
20792 nPoint_Restart = nGlobalPoint_Sort;
20801 beg_node =
new unsigned long[
size];
20802 end_node =
new unsigned long[
size];
20804 nPointLinear =
new unsigned long[
size];
20805 nPointCumulative =
new unsigned long[
size+1];
20807 unsigned long total_points = 0;
20808 for (
int ii = 0; ii <
size; ii++) {
20809 nPointLinear[ii] = nGlobalPoint_Sort/
size;
20810 total_points += nPointLinear[ii];
20815 unsigned long remainder = nGlobalPoint_Sort - total_points;
20816 for (
unsigned long ii = 0; ii < remainder; ii++) {
20817 nPointLinear[ii]++;
20825 end_node[0] = beg_node[0] + nPointLinear[0];
20826 nPointCumulative[0] = 0;
20827 for (
int ii = 1; ii <
size; ii++) {
20828 beg_node[ii] = end_node[ii-1];
20829 end_node[ii] = beg_node[ii] + nPointLinear[ii];
20830 nPointCumulative[ii] = nPointCumulative[ii-1] + nPointLinear[ii-1];
20832 nPointCumulative[
size] = nGlobalPoint_Sort;
20852 cout <<
"Sorting volumetric grid connectivity." << endl;
20868 cout <<
"Sorting surface grid connectivity." << endl;
20878 unsigned long nTotal_Elem = nParallel_Tria + nParallel_Quad + nParallel_Tetr + nParallel_Hexa + nParallel_Pris + nParallel_Pyra;
20879 unsigned long nTotal_Surf_Elem = nParallel_Line + nParallel_BoundTria + nParallel_BoundQuad;
20881 nGlobal_Elem_Par = nTotal_Elem;
20882 nSurf_Elem_Par = nTotal_Surf_Elem;
20893 unsigned short NODES_PER_ELEMENT = 0;
20894 switch (Elem_Type) {
20927 unsigned long nSubElem_Local = 0;
20928 for(
unsigned long i=0; i<nVolElemOwned; ++i) {
20932 const unsigned short VTK_Type1 = standardElementsSol[ind].
GetVTK_Type1();
20933 const unsigned short VTK_Type2 = standardElementsSol[ind].
GetVTK_Type2();
20937 if(Elem_Type == VTK_Type1) nSubElem_Local += standardElementsSol[ind].
GetNSubElemsType1();
20938 if(Elem_Type == VTK_Type2) nSubElem_Local += standardElementsSol[ind].
GetNSubElemsType2();
20943 int *Conn_SubElem = NULL;
20944 if(nSubElem_Local > 0) Conn_SubElem =
new int[nSubElem_Local*NODES_PER_ELEMENT];
20950 unsigned long kNode = 0;
20951 for(
unsigned long i=0; i<nVolElemOwned; ++i) {
20955 const unsigned short VTK_Type1 = standardElementsSol[ind].
GetVTK_Type1();
20956 const unsigned short VTK_Type2 = standardElementsSol[ind].
GetVTK_Type2();
20959 if(Elem_Type == VTK_Type1) {
20964 const unsigned short *connSubElems = standardElementsSol[ind].
GetSubConnType1();
20967 const unsigned short kk = NODES_PER_ELEMENT*nSubElems;
20968 for(
unsigned short k=0; k<kk; ++k, ++kNode)
20969 Conn_SubElem[kNode] = connSubElems[k] + volElem[i].offsetDOFsSolGlobal + 1;
20973 if(Elem_Type == VTK_Type2) {
20978 const unsigned short *connSubElems = standardElementsSol[ind].
GetSubConnType2();
20981 const unsigned short kk = NODES_PER_ELEMENT*nSubElems;
20982 for(
unsigned short k=0; k<kk; ++k, ++kNode)
20983 Conn_SubElem[kNode] = connSubElems[k] + volElem[i].offsetDOFsSolGlobal + 1;
20989 switch (Elem_Type) {
20991 nParallel_Tria = nSubElem_Local;
20992 Conn_Tria_Par = Conn_SubElem;
20995 nParallel_Quad = nSubElem_Local;
20996 Conn_Quad_Par = Conn_SubElem;
20999 nParallel_Tetr = nSubElem_Local;
21000 Conn_Tetr_Par = Conn_SubElem;
21003 nParallel_Hexa = nSubElem_Local;
21004 Conn_Hexa_Par = Conn_SubElem;
21007 nParallel_Pris = nSubElem_Local;
21008 Conn_Pris_Par = Conn_SubElem;
21011 nParallel_Pyra = nSubElem_Local;
21012 Conn_Pyra_Par = Conn_SubElem;
21023 unsigned short NODES_PER_ELEMENT = 0;
21024 switch (Elem_Type) {
21051 vector<unsigned long> globalID;
21052 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
21053 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
21055 globalID.push_back(globalIndex);
21062 unsigned long nSubElem_Local = 0;
21063 for(
unsigned short iMarker=0; iMarker < config->
GetnMarker_All(); ++iMarker) {
21064 if( !boundaries[iMarker].periodicBoundary ) {
21066 const vector<CSurfaceElementFEM> &surfElem = boundaries[iMarker].
surfElem;
21067 for(
unsigned long i=0; i<surfElem.size(); ++i) {
21068 const unsigned short ind = surfElem[i].indStandardElement;
21069 const unsigned short VTK_Type = standardBoundaryFacesSol[ind].
GetVTK_Type();
21070 if(Elem_Type == VTK_Type) nSubElem_Local += standardBoundaryFacesSol[ind].
GetNSubFaces();
21078 int *Conn_SubElem = NULL;
21079 if(nSubElem_Local > 0) Conn_SubElem =
new int[nSubElem_Local*NODES_PER_ELEMENT];
21083 unsigned long kNode = 0;
21084 for(
unsigned short iMarker=0; iMarker < config->
GetnMarker_All(); ++iMarker) {
21085 if( !boundaries[iMarker].periodicBoundary ) {
21087 const vector<CSurfaceElementFEM> &surfElem = boundaries[iMarker].
surfElem;
21090 for(
unsigned long i=0; i<surfElem.size(); ++i) {
21093 const unsigned short ind = surfElem[i].indStandardElement;
21094 const unsigned short VTK_Type = standardBoundaryFacesSol[ind].
GetVTK_Type();
21095 if(Elem_Type == VTK_Type) {
21099 const unsigned short nSubFaces = standardBoundaryFacesSol[ind].
GetNSubFaces();
21100 const unsigned short *connSubFaces = standardBoundaryFacesSol[ind].
GetSubFaceConn();
21103 const unsigned short kk = NODES_PER_ELEMENT*nSubFaces;
21104 for(
unsigned short k=0; k<kk; ++k, ++kNode)
21105 Conn_SubElem[kNode] = globalID[surfElem[i].DOFsSolFace[connSubFaces[k]]];
21114 switch (Elem_Type) {
21116 nParallel_Line = nSubElem_Local;
21117 Conn_BoundLine_Par = Conn_SubElem;
21120 nParallel_BoundTria = nSubElem_Local;
21121 Conn_BoundTria_Par = Conn_SubElem;
21124 nParallel_BoundQuad = nSubElem_Local;
21125 Conn_BoundQuad_Par = Conn_SubElem;
21135 unsigned long iProcessor;
21136 unsigned long iPoint, Global_Index;
21140 int VARS_PER_POINT = nVar_Par;
21159 vector<unsigned long> globalID;
21162 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
21165 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
21167 globalID.push_back(globalIndex);
21178 int *nPoint_Send =
new int[
size+1]; nPoint_Send[0] = 0;
21179 int *nPoint_Recv =
new int[
size+1]; nPoint_Recv[0] = 0;
21180 int *nPoint_Flag =
new int[
size];
21182 for (
int ii=0; ii <
size; ii++) {
21183 nPoint_Send[ii] = 0;
21184 nPoint_Recv[ii] = 0;
21185 nPoint_Flag[ii]= -1;
21187 nPoint_Send[
size] = 0; nPoint_Recv[
size] = 0;
21189 for (iPoint = 0; iPoint < nLocalPoint_Sort; iPoint++ ) {
21193 Global_Index = globalID[iPoint];
21197 iProcessor = Global_Index/nPointLinear[0];
21198 if (iProcessor >= (
unsigned long)size)
21199 iProcessor = (
unsigned long)size-1;
21200 if (Global_Index >= nPointCumulative[iProcessor])
21201 while(Global_Index >= nPointCumulative[iProcessor+1]) iProcessor++;
21203 while(Global_Index < nPointCumulative[iProcessor]) iProcessor--;
21208 if (nPoint_Flag[iProcessor] != (
int)iPoint) {
21209 nPoint_Flag[iProcessor] = (int)iPoint;
21210 nPoint_Send[iProcessor+1]++;
21223 nPoint_Recv[1] = nPoint_Send[1];
21231 int nSends = 0, nRecvs = 0;
21232 for (
int ii=0; ii <
size; ii++) nPoint_Flag[ii] = -1;
21234 for (
int ii = 0; ii <
size; ii++) {
21235 if ((ii !=
rank) && (nPoint_Send[ii+1] > 0)) nSends++;
21236 if ((ii !=
rank) && (nPoint_Recv[ii+1] > 0)) nRecvs++;
21238 nPoint_Send[ii+1] += nPoint_Send[ii];
21239 nPoint_Recv[ii+1] += nPoint_Recv[ii];
21245 connSend =
new su2double[VARS_PER_POINT*nPoint_Send[
size]];
21246 for (
int ii = 0; ii < VARS_PER_POINT*nPoint_Send[
size]; ii++)
21251 unsigned long *idSend =
new unsigned long[nPoint_Send[
size]];
21252 for (
int ii = 0; ii < nPoint_Send[
size]; ii++)
21258 unsigned long *index =
new unsigned long[
size];
21259 for (
int ii=0; ii <
size; ii++) index[ii] = VARS_PER_POINT*nPoint_Send[ii];
21261 unsigned long *idIndex =
new unsigned long[
size];
21262 for (
int ii=0; ii <
size; ii++) idIndex[ii] = nPoint_Send[ii];
21267 for (iPoint = 0; iPoint < nLocalPoint_Sort; iPoint++) {
21271 Global_Index = globalID[iPoint];
21275 iProcessor = Global_Index/nPointLinear[0];
21276 if (iProcessor >= (
unsigned long)size)
21277 iProcessor = (
unsigned long)size-1;
21278 if (Global_Index >= nPointCumulative[iProcessor])
21279 while(Global_Index >= nPointCumulative[iProcessor+1]) iProcessor++;
21281 while(Global_Index < nPointCumulative[iProcessor]) iProcessor--;
21285 if (nPoint_Flag[iProcessor] != (
int)iPoint) {
21287 nPoint_Flag[iProcessor] = (int)iPoint;
21288 unsigned long nn = index[iProcessor];
21292 for (
unsigned short kk = 0; kk < VARS_PER_POINT; kk++) {
21293 connSend[nn] = Local_Data[iPoint][kk]; nn++;
21299 nn = idIndex[iProcessor];
21300 idSend[nn] = Global_Index - beg_node[iProcessor];
21304 index[iProcessor] += VARS_PER_POINT;
21305 idIndex[iProcessor]++;
21322 connRecv =
new su2double[VARS_PER_POINT*nPoint_Recv[
size]];
21323 for (
int ii = 0; ii < VARS_PER_POINT*nPoint_Recv[
size]; ii++)
21326 unsigned long *idRecv =
new unsigned long[nPoint_Recv[
size]];
21327 for (
int ii = 0; ii < nPoint_Recv[
size]; ii++)
21337 unsigned long iMessage = 0;
21338 for (
int ii=0; ii<
size; ii++) {
21339 if ((ii !=
rank) && (nPoint_Recv[ii+1] > nPoint_Recv[ii])) {
21340 int ll = VARS_PER_POINT*nPoint_Recv[ii];
21341 int kk = nPoint_Recv[ii+1] - nPoint_Recv[ii];
21342 int count = VARS_PER_POINT*kk;
21354 for (
int ii=0; ii<
size; ii++) {
21355 if ((ii !=
rank) && (nPoint_Send[ii+1] > nPoint_Send[ii])) {
21356 int ll = VARS_PER_POINT*nPoint_Send[ii];
21357 int kk = nPoint_Send[ii+1] - nPoint_Send[ii];
21358 int count = VARS_PER_POINT*kk;
21360 int tag =
rank + 1;
21370 for (
int ii=0; ii<
size; ii++) {
21371 if ((ii !=
rank) && (nPoint_Recv[ii+1] > nPoint_Recv[ii])) {
21372 int ll = nPoint_Recv[ii];
21373 int kk = nPoint_Recv[ii+1] - nPoint_Recv[ii];
21386 for (
int ii=0; ii<
size; ii++) {
21387 if ((ii !=
rank) && (nPoint_Send[ii+1] > nPoint_Send[ii])) {
21388 int ll = nPoint_Send[ii];
21389 int kk = nPoint_Send[ii+1] - nPoint_Send[ii];
21392 int tag =
rank + 1;
21402 int mm = VARS_PER_POINT*nPoint_Recv[
rank];
21403 int ll = VARS_PER_POINT*nPoint_Send[
rank];
21404 int kk = VARS_PER_POINT*nPoint_Send[
rank+1];
21406 for (
int nn=ll; nn<kk; nn++, mm++) connRecv[mm] = connSend[nn];
21408 mm = nPoint_Recv[
rank];
21409 ll = nPoint_Send[
rank];
21410 kk = nPoint_Send[
rank+1];
21412 for (
int nn=ll; nn<kk; nn++, mm++) idRecv[mm] = idSend[nn];
21417 int number = 2*nSends;
21418 for (
int ii = 0; ii < number; ii++)
21422 for (
int ii = 0; ii < number; ii++)
21425 delete [] send_req;
21426 delete [] recv_req;
21433 Parallel_Data =
new su2double*[VARS_PER_POINT];
21434 for (
int jj = 0; jj < VARS_PER_POINT; jj++) {
21436 for (
int ii = 0; ii < nPoint_Recv[
size]; ii++) {
21437 Parallel_Data[jj][idRecv[ii]] = connRecv[ii*VARS_PER_POINT+jj];
21444 nParallel_Poin = nPoint_Recv[
size];
21449 nGlobal_Poin_Par = nParallel_Poin;
21457 delete [] connSend;
21458 delete [] connRecv;
21461 delete [] nPoint_Recv;
21462 delete [] nPoint_Send;
21463 delete [] nPoint_Flag;
21465 for (iPoint = 0; iPoint < nLocalPoint_Sort; iPoint++)
21466 delete [] Local_Data[iPoint];
21467 delete [] Local_Data;
21473 const int VARS_PER_POINT = nVar_Par;
21483 std::vector<unsigned long> globalSurfaceDOFIDs;
21488 for(
unsigned long i=0; i<(nParallel_Line*
N_POINTS_LINE); ++i) {
21489 const unsigned long globalID = Conn_BoundLine_Par[i]-1;
21490 globalSurfaceDOFIDs.push_back(globalID);
21494 const unsigned long globalID = Conn_BoundTria_Par[i]-1;
21495 globalSurfaceDOFIDs.push_back(globalID);
21499 const unsigned long globalID = Conn_BoundQuad_Par[i]-1;
21500 globalSurfaceDOFIDs.push_back(globalID);
21505 sort(globalSurfaceDOFIDs.begin(), globalSurfaceDOFIDs.end());
21506 vector<unsigned long>::iterator lastEntry;
21507 lastEntry = unique(globalSurfaceDOFIDs.begin(), globalSurfaceDOFIDs.end());
21508 globalSurfaceDOFIDs.erase(lastEntry, globalSurfaceDOFIDs.end());
21517 vector<vector<unsigned long> > sendBuf(
size, vector<unsigned long>(0));
21521 for(
unsigned long i=0; i<globalSurfaceDOFIDs.size(); ++i) {
21524 unsigned long iProcessor = globalSurfaceDOFIDs[i]/nPointLinear[0];
21525 if (iProcessor >= (
unsigned long)
size)
21526 iProcessor = (
unsigned long)
size-1;
21527 if (globalSurfaceDOFIDs[i] >= nPointCumulative[iProcessor])
21528 while(globalSurfaceDOFIDs[i] >= nPointCumulative[iProcessor+1]) ++iProcessor;
21530 while(globalSurfaceDOFIDs[i] < nPointCumulative[iProcessor]) --iProcessor;
21533 sendBuf[iProcessor].push_back(globalSurfaceDOFIDs[i]);
21538 vector<unsigned long> nDOFSend(
size);
21539 for(
int i=0; i<
size; ++i) {
21540 nDOFSend[i] = sendBuf[i].size();
21541 if(nDOFSend[i] && (i !=
rank)) ++nRankSend;
21545 vector<unsigned long> nDOFRecv(size);
21556 for(
int i=0; i<
size; ++i) {
21557 if(nDOFRecv[i] && (i !=
rank)) ++nRankRecv;
21561 vector<vector<unsigned long> > recvBuf(size, vector<unsigned long>(0));
21565 vector<SU2_MPI::Request> sendReq(nRankSend);
21567 for(
int i=0; i<
size; ++i) {
21568 if(nDOFSend[i] && (i !=
rank)) {
21576 vector<SU2_MPI::Request> recvReq(nRankRecv);
21578 for(
int i=0; i<
size; ++i) {
21579 if(nDOFRecv[i] && (i !=
rank)) {
21580 recvBuf[i].resize(nDOFRecv[i]);
21604 globalSurfaceDOFIDs.resize(0);
21605 for(
int i=0; i<
size; ++i) {
21607 globalSurfaceDOFIDs.insert(globalSurfaceDOFIDs.end(),
21608 recvBuf[i].begin(), recvBuf[i].end());
21611 sort(globalSurfaceDOFIDs.begin(), globalSurfaceDOFIDs.end());
21612 lastEntry = unique(globalSurfaceDOFIDs.begin(), globalSurfaceDOFIDs.end());
21613 globalSurfaceDOFIDs.erase(lastEntry, globalSurfaceDOFIDs.end());
21616 nSurf_Poin_Par = globalSurfaceDOFIDs.size();
21618 Parallel_Surf_Data =
new su2double*[VARS_PER_POINT];
21619 for(
int jj=0; jj<VARS_PER_POINT; jj++)
21620 Parallel_Surf_Data[jj] =
new su2double[nSurf_Poin_Par];
21624 for(
unsigned long i=0; i<nSurf_Poin_Par; ++i) {
21625 const unsigned long ii = globalSurfaceDOFIDs[i] - nPointCumulative[
rank];
21627 for(
int jj=0; jj<VARS_PER_POINT; jj++)
21628 Parallel_Surf_Data[jj][i] = Parallel_Data[jj][ii];
21637 nGlobal_Surf_Poin = nSurf_Poin_Par;
21646 unsigned long offsetSurfaceDOFs = 0;
21648 vector<unsigned long> nSurfaceDOFsRanks(size);
21654 for(
int i=0; i<
rank; ++i) offsetSurfaceDOFs += nSurfaceDOFsRanks[i];
21659 map<unsigned long, unsigned long> mapGlobalVol2Surf;
21660 for(
unsigned long i=0; i<nSurf_Poin_Par; ++i)
21661 mapGlobalVol2Surf[globalSurfaceDOFIDs[i]] = offsetSurfaceDOFs + i;
21665 for(
int i=0; i<
size; ++i) {
21666 for(
unsigned long j=0; j<nDOFRecv[i]; ++j)
21667 recvBuf[i][j] = mapGlobalVol2Surf.find(recvBuf[i][j])->second;
21672 vector<vector<unsigned long> > originalSendBuf = sendBuf;
21678 for(
int i=0; i<
size; ++i) {
21679 if(nDOFRecv[i] && (i != rank)) {
21689 for(
int i=0; i<
size; ++i) {
21690 if(nDOFSend[i] && (i != rank)) {
21711 mapGlobalVol2Surf.clear();
21713 for(
int i=0; i<
size; ++i) {
21714 for(
unsigned long j=0; j<nDOFSend[i]; ++j)
21715 mapGlobalVol2Surf[originalSendBuf[i][j]+1] = sendBuf[i][j]+1;
21719 for(
unsigned long i=0; i<(nParallel_Line*
N_POINTS_LINE); ++i)
21720 Conn_BoundLine_Par[i] = mapGlobalVol2Surf.find(Conn_BoundLine_Par[i])->second;
21723 Conn_BoundTria_Par[i] = mapGlobalVol2Surf.find(Conn_BoundTria_Par[i])->second;
21726 Conn_BoundQuad_Par[i] = mapGlobalVol2Surf.find(Conn_BoundQuad_Par[i])->second;
virtual su2double GetSurface_CD(unsigned short val_marker)
A virtual member.
virtual su2double GetAllBound_CL_Inv(void)
A virtual member.
su2double * GetPoint_Max_Coord(unsigned short val_var)
Get the location of the maximal residual, this is useful for the convergence history.
void WriteTurboPerfConvHistory(CConfig *config)
Compute .
void SetiInst(unsigned short val_iInst)
Set the current instance.
const unsigned short N_POINTS_LINE
General output & CGNS defines.
const int HEAT_SOL
Position of the heat equation in the solution solver array.
virtual CFluidModel * GetFluidModel(void)
Compute the pressure at the infinity.
string GetBreakdown_FileName(void)
Get the name of the file with the forces breakdown of the problem.
unsigned short GetnMarker_Turbomachinery(void)
number Turbomachinery performance option specified from config file.
Running the SU2_DEF software.
su2double GetdCMx_dCL(void)
Value of the weight of the CD, CL, CM optimization.
su2double GetAoS_Offset(void)
Get the off set sideslip angle of the body. The solution and the geometry file are able to modifity t...
Non-dimensional compressible simulation with freestream pressure equal to 1.0.
virtual su2double GetCPressure(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
void DeallocateConnectivity(CConfig *config, CGeometry *geometry, bool surf_sol)
Deallocate temporary memory needed for merging and writing connectivity.
void WriteCSV_Slice(CConfig *config, CGeometry *geometry, CSolver *FlowSolver, unsigned long iExtIter, unsigned short val_iZone, unsigned short val_direction)
Create and write a CSV file with a slice of data.
su2double GetSurface_MomentumDistortion(unsigned short val_imarker)
Get the momentum distortion at the surface.
void WriteRestart_Parallel_ASCII(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone, unsigned short val_iInst)
Write a native SU2 restart file (ASCII) in parallel.
Tecplot binary format for the solution output.
bool GetWrt_Vol_Sol(void)
Get information about writing a volume solution file.
virtual su2double GetCSkinFriction(unsigned short val_marker, unsigned long val_vertex, unsigned short val_dim)
A virtual member.
bool GetContinuous_Adjoint(void)
Determines if problem is adjoint.
su2double GetGas_ConstantND(void)
Get the value of specific gas constant.
void SetResult_Files(CSolver *****solver_container, CGeometry ****geometry, CConfig **config, unsigned long iExtIter, unsigned short val_nZone)
Writes and organizes the all the output files, except the history one, for serial computations...
bool GetBuffet_Monitoring(void)
Provides the buffet monitoring information.
unsigned short GetKind_ObjFunc(void)
Get the kind of objective function. There are several options: Drag coefficient, Lift coefficient...
static void Error(std::string ErrorMsg, std::string FunctionName)
su2double GetVelocity_Ref(void)
Get the value of the reference velocity for non-dimensionalization.
Objective function defined as the difference of a particular node respect to a reference position...
virtual su2double GetTotal_CFEA(void)
A virtual member.
string GetMesh_Out_FileName(void)
Get name of the output grid, this parameter is important for grid adaptation and deformation.
Definition of compressible solver.
virtual su2double GetAllBound_CSF_Mnt(void)
A virtual member.
CFEMStandardElement * GetStandardElementsSol(void)
Function, which makes available the standard volume elements of the solution.
su2double GetCoord(unsigned short val_dim)
Get the coordinates dor the control volume.
VTK nomenclature for defining a tetrahedron element.
virtual su2double GetAllBound_CFy_Mnt(void)
A virtual member.
Definition of a FEM solver.
su2double GetdCD_dCL(void)
Value of the weight of the CD, CL, CM optimization.
unsigned short GetnZone(void)
Get number of zones.
unsigned short indStandardElement
Index in the vector of standard elements.
Definition of the finite element Navier-Stokes' solver.
Class which contains all the variables for the DG FEM solver.
unsigned short GetKind_ConductivityModel(void)
Get the value of the thermal conductivity model.
virtual void Evaluate_ObjFunc(CConfig *config)
Compute weighted-sum "combo" objective output.
bool GetInvDesign_Cp(void)
Information about computing and plotting the equivalent area distribution.
static void Gather(void *sendbuf, int sendcnt, Datatype sendtype, void *recvbuf, int recvcnt, Datatype recvtype, int root, Comm comm)
virtual su2double GetTotal_OFRefGeom(void)
A virtual member.
void SpecialOutput_SpanLoad(CSolver *solver, CGeometry *geometry, CConfig *config, bool output)
Writes forces at different sections.
virtual su2double GetGeometry_CrossTerm_Derivative(unsigned long iPoint, unsigned long iVar) const
A virtual member. Get the geometry solution.
bool GetGravityForce(void)
Get information about the gravity force.
unsigned short GetKind_Turb_Model(void)
Get the kind of the turbulence model.
virtual su2double GetTotal_OFRefNode(void)
A virtual member.
Definition of the continuous adjoint Reynolds-averaged Navier-Stokes' (RANS) solver.
static void Waitany(int nrequests, Request *request, int *index, Status *status)
virtual su2double GetLimiter_Primitive(unsigned long iPoint, unsigned long iVar) const
A virtual member.
bool GetDomain(void)
For parallel computation, its indicates if a point must be computed or not.
virtual su2double GetAllBound_CFz_Inv(void)
A virtual member.
Kind of Turbulence model (Menter SST with sustaining terms for free-stream preservation).
const int ADJHEAT_SOL
Position of the adjoint heat equation in the solution solver array.
Definition of the incompressible Reynolds-averaged Navier-Stokes' (RANS) solver.
const int TURB_SOL
Position of the turbulence model solution in the solver container array.
virtual su2double GetTotal_CoPx(void)
A virtual member.
void DeallocateData_Parallel(CConfig *config, CGeometry *geometry)
Deallocate temporary memory needed for merging and writing output data in parallel.
void LoadLocalData_Base(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
void SortVolumetricConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Sort the connectivity for a single volume element type into a linear partitioning across all processo...
double GetValue(const su2double &data)
Get the (primitive) value of the datatype (needs to be implemented for each new type).
unsigned short GetKind_Trans_Model(void)
Get the kind of the transition model.
virtual su2double GetCPressureTarget(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
void SortOutputData_Surface_FEM(CConfig *config, CGeometry *geometry)
Sort the surface output data for each grid node into a linear partitioning across all processors (DG-...
virtual su2double GetSurface_CFx_Visc(unsigned short val_marker)
A virtual member.
bool GetWeakly_Coupled_Heat(void)
Get the heat equation.
virtual su2double GetTotal_Power(void)
A virtual member.
ScalarType * GetBlock(unsigned long val_ipoint)
Get the value of the residual.
unsigned short GetnMarker_TurboPerformance(void)
number Turbomachinery performance option specified from config file.
virtual su2double GetSoundSpeed(unsigned long iPoint) const
A virtual member.
const int FLOW_SOL
Position of the mean flow solution in the solver container array.
virtual su2double GetSurface_CMx_Visc(unsigned short val_marker)
A virtual member.
const unsigned short N_POINTS_TRIANGLE
General output & CGNS defines.
virtual su2double GetHeatFlux(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
void SetSurface_Mach(unsigned short val_imarker, su2double val_surface_mach)
Set the mach number at the surface.
virtual su2double GetSurface_CFy_Mnt(unsigned short val_marker)
A virtual member.
void SetSurfaceCSV_Flow(CConfig *config, CGeometry *geometry, CSolver *FlowSolver, unsigned long iExtIter, unsigned short val_iZone, unsigned short val_iInst)
Create and write the file with the flow coefficient on the surface.
void MergeBaselineSolution_FEM(CConfig *config, CGeometry *geometry, CSolver *solver, unsigned short val_iZone)
Merge the solution into a data structure used for output file writing (DG-FEM).
Definition of the Navier-Stokes' solver.
virtual su2double GetDensity(unsigned long iPoint) const
A virtual member.
su2double GetRes_RMS(unsigned short val_var)
Get the maximal residual, this is useful for the convergence history.
su2double GetAoS(void)
Get the angle of sideslip of the body. It relates to the rotation of the aircraft centerline from the...
CBaseMPIWrapper::Status * MPI_STATUS_IGNORE
unsigned short GetnMarker_All(void)
Get the total number of boundary markers including send/receive domains.
virtual su2double GetAllBound_CEff_Visc(void)
A virtual member.
Definition of the incompressible Navier-Stokes' solver.
void SetSurface_Uniformity(unsigned short val_imarker, su2double val_surface_streamwiseuniformity)
Set the streamwise flow uniformity at the surface.
virtual su2double GetVelocity_Inf(unsigned short val_dim)
A virtual member.
virtual su2double GetAllBound_CFz_Mnt(void)
A virtual member.
Definition of linear elastic material.
virtual su2double GetSurface_CFx_Mnt(unsigned short val_marker)
A virtual member.
void SetCp_InverseDesign(CSolver *solver_container, CGeometry *geometry, CConfig *config, unsigned long iExtIter)
Writes inverse design.
bool GetInvDesign_HeatFlux(void)
Information about computing and plotting the equivalent area distribution.
No slip isothermal wall boundary condition.
su2double * GetGridVel(void)
Get the value of the grid velocity at the point.
virtual su2double GetRoe_Dissipation(unsigned long iPoint) const
A virtual member.
virtual su2double GetTotal_IDC(void)
A virtual member.
su2double GetBulk_Modulus(void)
Get the value of the bulk modulus.
virtual su2double GetSolution_Vel(unsigned long iPoint, unsigned long iVar) const
Get the velocity (Structural Analysis).
virtual su2double GetSurface_CMz_Inv(unsigned short val_marker)
A virtual member.
void SetSurface_MassFlow(unsigned short val_imarker, su2double val_surface_massflow)
Set the massflow at the surface.
Paraview ASCII format for the solution output.
unsigned short GetNDOFsPerSubFace(void) const
Function, which makes available the number of DOFs of a linear subface, used for plotting, among others, plotting.
virtual su2double GetTotal_CMz(void)
A virtual member.
su2double GetFlowAngleIn_BC()
Get the inlet flow angle imposed as BC for internal flow.
virtual su2double GetEddyViscosity(unsigned long iPoint) const
A virtual member.
su2double GetSurface_TotalPressure(unsigned short val_imarker)
Get the total pressure at an outlet boundary.
void SpecialOutput_SonicBoom(CSolver *solver, CGeometry *geometry, CConfig *config, bool output)
Writes equivalent area.
virtual su2double GetAllBound_CFx_Mnt(void)
A virtual member.
virtual su2double GetYPlus(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
virtual su2double GetAllBound_CMz_Mnt(void)
A virtual member.
long GetExtraHeatOutputZone(void)
Heat solver zone with extra screen output.
Tecplot format for the solution output.
su2double GetRestart_Bandwidth_Agg(void)
Set the sum of the bandwidth for writing binary restarts (to be averaged later).
CBoundaryFEM * GetBoundaries(void)
Function, which makes available the boundaries of the local FEM mesh.
void GetLocalError(const su2double *val_coords, const su2double val_t, const su2double *GetLocalErrorval_solution, su2double *val_error)
Get the local error defined as the local solution minus the verification solution.
virtual su2double GetGlobal_Sens_Nu(unsigned short iVal)
A virtual member.
Derivative with respect to the turb2lam.
virtual su2double GetTotal_NetThrust(void)
A virtual member.
unsigned long GetNVolElemOwned(void)
Function, which makes available the number of owned volume elements in the local FEM mesh...
void SpecialOutput_AnalyzeSurface(CSolver *solver, CGeometry *geometry, CConfig *config, bool output)
Writes one dimensional output.
bool GetRotating_Frame(void)
Get information about the rotational frame.
Kind of Turbulence model (Menter SST).
su2double GetTemperature()
Get fluid temperature.
virtual su2double GetSurface_Buffet_Metric(unsigned short val_marker)
A virtual member.
bool GetAeroelastic_Simulation(void)
Get information about the aeroelastic simulation.
bool GetDynamic_Grid(void)
Get information about dynamic grids.
static void Comm_size(Comm comm, int *size)
VTK nomenclature for defining a line element.
Definition of Neo-Hookean material.
su2double GetPressure()
Get fluid pressure.
unsigned short GetKind_DensityModel(void)
Option to define the density model for incompressible flows.
su2double GetEA_IntLimit(unsigned short index)
Get the integration limits for the equivalent area computation.
unsigned short GetnMarker_ActDiskInlet(void)
Get the total number of boundary markers.
su2double GetStations_Bounds(unsigned short val_var)
Get the value of the limits for the sections.
const int SINGLE_NODE
There is only a node in the MPI parallelization.
static void Irecv(void *buf, int count, Datatype datatype, int source, int tag, Comm comm, Request *request)
unsigned short GetnMarker_Monitoring(void)
Get the total number of monitoring markers.
bool GetVisualize_Surface_Def(void)
Creates a teot file to visualize the surface deformation deformation made by the DEF software...
virtual void SetTotal_CEquivArea(su2double val_cequivarea)
A virtual member.
Kind of Turbulent model (Spalart-Allmaras).
string GetMarker_TurboPerf_BoundOut(unsigned short index)
get outlet bounds name for Turbomachinery performance calculation.
void SetHeatFlux_InverseDesign(CSolver *solver_container, CGeometry *geometry, CConfig *config, unsigned long iExtIter)
Writes inverse design.
string GetMultizone_FileName(string val_filename, int val_iZone, string ext)
Append the zone index to the restart or the solution files.
void SortOutputData_FEM(CConfig *config, CGeometry *geometry)
Sort the output data for each grid node into a linear partitioning across all processors (DG-FEM solv...
string GetMarker_TurboPerf_BoundIn(unsigned short index)
get inlet bounds name for Turbomachinery performance calculation.
virtual su2double GetTotal_CQ(void)
A virtual member.
virtual su2double GetSensitivity(unsigned long iPoint, unsigned long iDim) const
Get the Sensitivity at the node.
virtual void SetTotal_CpDiff(su2double val_pressure)
A virtual member.
unsigned short GetKind_SGS_Model(void)
Get the kind of the subgrid scale model.
virtual void SetTotal_HeatFluxDiff(su2double val_heat)
A virtual member.
Derivative with respect to the freestream temperature.
string GetMultiInstance_FileName(string val_filename, int val_iInst, string ext)
Append the instance index to the restart or the solution files.
unsigned short GetKind_Regime(void)
Governing equations of the flow (it can be different from the run time equation). ...
Derivative with respect to the viscosity.
virtual su2double GetAllBound_CFx_Visc(void)
A virtual member.
unsigned short GetnMarker_EngineExhaust(void)
Get the total number of boundary markers.
void DeallocateCoordinates(CConfig *config, CGeometry *geometry)
Write the nodal coordinates and connectivity to a Tecplot binary mesh file.
virtual su2double GetAllBound_CMz_Visc(void)
A virtual member.
COutputLegacy(CConfig *congig)
Constructor of the class.
virtual void GetSolution(const su2double *val_coords, const su2double val_t, su2double *val_solution)
Get the exact solution at the current position and time.
virtual su2double GetTotal_MaxHeatFlux(void)
A virtual member.
virtual void SetTDState_rhoe(su2double rho, su2double e)
virtual member that would be different for each gas model implemented
unsigned short GetNSubElemsType2(void) const
Function, which makes available the number of sub-elements of type 2 for plotting.
virtual unsigned long GetnElemTria()
A virtual member.
bool GetTime_Domain(void)
Check if the multizone problem is solved for time domain.
const unsigned int INST_0
Definition of the first instance per grid level.
su2double GetMin_Delta_Time(void)
Get the value of the minimum delta time.
Derivative with respect to the freestream pressure.
su2double GetInitial_BCThrust(void)
Get the value of the non-dimensionalized actuator disk turbulence intensity.
void LoadLocalData_FEM(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
virtual su2double GetAllBound_CFy_Inv(void)
A virtual member.
void SetSurface_IDC(unsigned short val_imarker, su2double val_surface_distortion)
Get the back pressure (static) at an outlet boundary.
unsigned short GetnLocationStations(void)
Get the number of sections.
Comma-separated values format for the solution output.
su2double GetSurface_TotalTemperature(unsigned short val_imarker)
Get the total temperature at an outlet boundary.
bool GetEquivArea(void)
Information about computing and plotting the equivalent area distribution.
virtual su2double GetVonMises_Stress(unsigned long iPoint) const
A virtual member.
virtual su2double GetTotal_CFy(void)
A virtual member.
virtual su2double GetSurface_CSF_Mnt(unsigned short val_marker)
A virtual member.
Constant thermal conductivity.
void LoadLocalData_Elasticity(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
bool GetWrt_Performance(void)
Get information about writing the performance summary at the end of a calculation.
su2double GetSurface_Uniformity(unsigned short val_imarker)
Get the streamwise flow uniformity at the surface.
unsigned long GetExtIter_OffSet(void)
Get the current internal iteration number.
void SetBaselineResult_Files_FEM(CSolver ***solver, CGeometry ***geometry, CConfig **config, unsigned long iExtIter, unsigned short val_nZone)
Writes and organizes the all the output files, except the history one, for DG-FEM simulations (SU2_SO...
virtual su2double GetTotal_CEff(void)
A virtual member.
void MergeCoordinates(CConfig *config, CGeometry *geometry)
Merge the node coordinates from all processors.
virtual su2double GetTotal_Custom_ObjFunc(void)
A virtual member.
virtual su2double GetSpecificHeatCp(unsigned long iPoint) const
A virtual member.
su2double GetPressure_ThermodynamicND(void)
Get the value of the non-dimensionalized thermodynamic pressure.
unsigned short nDOFsSol
Number of DOFs for the solution of the element.
virtual su2double GetTotal_AeroCD(void)
A virtual member.
unsigned short GetFinestMesh(void)
Get the index of the finest grid.
virtual unsigned long GetNode(unsigned short val_node)=0
A pure virtual member.
bool GetWrt_Csv_Sol(void)
Get information about writing a surface comma-separated values (CSV) solution file.
Class to store a volume element for the FEM solver.
virtual su2double GetSurface_CMx(unsigned short val_marker)
A virtual member.
unsigned long offsetDOFsSolGlobal
Global offset of the solution DOFs of this element.
void SetSurface_PressureDrop(unsigned short val_imarker, su2double val_surface_pressuredrop)
Set the pressure drop between two surfaces.
virtual su2double GetSurface_CMy(unsigned short val_marker)
A virtual member.
Definition of the finite element Euler's solver.
virtual su2double GetPressure_Inf(void)
A virtual member.
void SortOutputData(CConfig *config, CGeometry *geometry)
Sort the output data for each grid node into a linear partitioning across all processors.
Use a dual time stepping strategy for unsteady computations (2nd order).
void SpecialOutput_Distortion(CSolver *solver, CGeometry *geometry, CConfig *config, bool output)
Create and write the file with the flow coefficient on the surface.
virtual su2double GetSurface_CFy_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CFy_Inv(unsigned short val_marker)
A virtual member.
su2double GetMach(void)
Get the value of the Mach number (velocity divided by speed of sound).
Derivative with respect to the reynolds number.
su2double GetSharpEdge_Distance(void)
Get the value of the distance to a sharp edge.
Definition of the discrete adjoint imcompressible Navier-Stokes'.
virtual void SetTotal_ComboObj(su2double ComboObj)
Set the total "combo" objective (weighted sum of other values).
Tecplot format for the solution output.
virtual void SetTotal_DC60(su2double val_Total_DC60)
A virtual member.
virtual unsigned long GetnElemTetr()
A virtual member.
void WriteRestart_Parallel_Binary(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone, unsigned short val_iInst)
Write a native SU2 restart file (binary) in parallel.
void MergeSolution_FEM(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Merge the FEM solution into a data structure used for output file writing.
virtual unsigned short GetVTK_Type(void)=0
A pure virtual member.
void LoadLocalData_Flow(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
su2double GetSurface_Pressure(unsigned short val_imarker)
Get the pressure at an outlet boundary.
virtual su2double GetTotal_HeatFlux(void)
A virtual member.
void SetConvHistory_Header(ofstream *ConvHist_file, CConfig *config, unsigned short val_iZone, unsigned short val_iInst)
Write the header of the history file.
void MergeBaselineSolution(CConfig *config, CGeometry *geometry, CSolver *solver, unsigned short val_iZone)
Merge the solution into a data structure used for output file writing.
unsigned short GetTime_Marching(void)
Provides information about the time integration, and change the write in the output files information...
virtual su2double GetTotal_Sens_Mach(void)
A virtual member.
su2double GetLocationStations(unsigned short val_section)
Get the airfoil sections in the slicing process.
virtual unsigned long GetnElemPris()
A virtual member.
void SetConvHistory_Body(ofstream *ConvHist_file, CGeometry ****geometry, CSolver *****solver_container, CConfig **config, CIntegration ****integration, bool DualTime, su2double timeused, unsigned short val_iZone, unsigned short val_iInst)
Write the history file and the convergence on the screen for serial computations. ...
su2double GetSurface_SecondaryStrength(unsigned short val_imarker)
Get the secondary flow strength at the surface.
Boundary send-receive definition.
su2double GetSensor(unsigned long iPoint) const
Get the pressure sensor.
const unsigned int MESH_0
Definition of the finest grid level.
Absolute criteria: abs(Res).
bool GetAxisymmetric(void)
Get information about the axisymmetric frame.
virtual su2double GetSurface_CL(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CL_Mnt(unsigned short val_marker)
A virtual member.
Non-dimensional compressible simulation with freestream velocity equal to Mach number.
void SortSurfaceConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Sort the connectivity for a single surface element type into a linear partitioning across all process...
string GetConv_FileName(void)
Get the name of the file with the convergence history of the problem.
virtual su2double GetTotal_SolidCD(void)
A virtual member.
virtual su2double GetSurface_CSF(unsigned short val_marker)
A virtual member.
void GetNormal(su2double *val_normal)
Copy the the normal vector of a face.
unsigned short GetMarker_All_KindBC(unsigned short val_marker)
Get the kind of boundary for each marker.
Dimensional simulation (compressible or incompressible).
virtual su2double GetTotal_Sens_Temp(void)
Set the total farfield temperature sensitivity coefficient.
su2double GetDensity_Ref(void)
Get the value of the reference density for non-dimensionalization.
unsigned short GetKind_SU2(void)
Get the kind of SU2 software component.
bool GetWrt_Limiters(void)
Get information about writing residuals to volume solution file.
virtual su2double GetSurface_CFx(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_CL(void)
A virtual member.
unsigned short GetnMarker_EngineInflow(void)
Get the total number of boundary markers.
virtual su2double GetSurface_CMy_Visc(unsigned short val_marker)
A virtual member.
su2double * GetVelocity_FreeStreamND(void)
Get the vector of the non-dimensionalized freestream velocity.
CVolumeElementFEM * GetVolElem(void)
Function, which makes available the volume elements in the local FEM mesh.
su2double GetPhysicalTime(void)
Get the current physical time.
CVertex *** vertex
Boundary Vertex vector (dual grid information).
virtual su2double GetSurface_CEff_Inv(unsigned short val_marker)
A virtual member.
bool GetFrozen_Visc_Cont(void)
Provides information about the way in which the turbulence will be treated by the cont...
VTK nomenclature for defining a hexahedron element.
virtual unsigned long GetnElemQuad()
A virtual member.
Kind of Turbulent model (Spalart-Allmaras Edwards).
const int ADJFEA_SOL
Position of the FEA adjoint equation in the solution solver array.
Definition of the discrete adjoint Reynolds-averaged Navier-Stokes' (RANS) solver.
virtual su2double GetThermalConductivity(unsigned long iPoint) const
A virtual member.
CFEMStandardBoundaryFace * GetStandardBoundaryFacesSol(void)
Function, which makes available the standard boundary faces of the solution.
virtual unsigned long GetGlobal_nPointDomain()
A virtual member.
virtual su2double GetSurface_CFx_Inv(unsigned short val_marker)
A virtual member.
virtual su2double GetAllBound_CMz_Inv(void)
A virtual member.
const unsigned int MAX_STRING_SIZE
Maximum number of domains.
Definition of incompressible solver.
unsigned long GetnElem(void)
Get number of elements.
su2double GetMach_Motion(void)
Get the mach number based on the mesh velocity and freestream quantities.
void LoadLocalData_AdjFlow(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
const unsigned short N_POINTS_TETRAHEDRON
General output & CGNS defines.
Include contribution to effective conductivity using constant turbulent Prandtl number for RANS...
bool GetSpecial_Output(void)
Check if the special output is written.
Incompressible ideal gas model.
virtual void SetCPressureTarget(unsigned short val_marker, unsigned long val_vertex, su2double val_pressure)
A virtual member.
unsigned short GetTabular_FileFormat(void)
Get the format of the output solution.
su2double GetPressureOut_BC()
Get the outlet pressure imposed as BC for internal flow.
~COutputLegacy(void)
Destructor of the class.
virtual su2double GetTotal_Sens_Press(void)
Set the total farfield pressure sensitivity coefficient.
virtual su2double GetSurface_CD_Mnt(unsigned short val_marker)
A virtual member.
su2double * GetSpanWiseValue(unsigned short val_marker)
Get number of vertices.
const su2double PI_NUMBER
Pi number.
CVerificationSolution * VerificationSolution
Verification solution class used within the solver.
virtual su2double * GetStress_FEM(unsigned long iPoint)
A virtual member.
void SetResult_Files_Parallel(CSolver *****solver_container, CGeometry ****geometry, CConfig **config, unsigned long iExtIter, unsigned short val_nZone)
Writes and organizes the all the output files, except the history one, for parallel computations...
Mass-flux weighted average.
Non-dimensional incompressible simulation based on custom reference values.
Definition of the incompressible Euler's solver.
virtual su2double GetTemperature(unsigned long iPoint) const
A virtual member.
No turbulent contribution to the effective thermal conductivity for RANS.
void SpecialOutput_FSI(ofstream *FSIHist_file, CGeometry ****geometry, CSolver *****solver_container, CConfig **config, CIntegration ****integration, unsigned long iExtIter, unsigned short ZONE_FLOW, unsigned short ZONE_STRUCT, bool header)
Create and write the file with the FSI convergence history.
VTK nomenclature for defining a quadrilateral element.
Inc. ideal gas, polynomial gas model.
unsigned short GetNSubFaces(void) const
Function, which makes available the number of linear subfaces used for plotting, among others...
const int CGNS_STRING_SIZE
Length of strings used in the CGNS format.
virtual su2double GetAllBound_CMy_Mnt(void)
A virtual member.
Sensor for detecting separation.
virtual su2double GetSurface_CMy_Inv(unsigned short val_marker)
A virtual member.
bool GetWrt_Dynamic(void)
Get information about writing dynamic structural analysis headers and file extensions.
virtual su2double GetSurface_CMx_Mnt(unsigned short val_marker)
A virtual member.
Definition of the Reynolds-averaged Navier-Stokes' (RANS) solver.
virtual unsigned long GetIter_Update_AoA()
A virtual member.
bool GetWrt_Surface(void)
Write solution at each surface.
virtual su2double GetTotal_Sens_ModVel(void)
A virtual member.
Implicit LES, i.e. no explicit SGS model.
virtual su2double GetTotal_Sens_BPress(void)
Get the total back pressure sensitivity coefficient.
const unsigned short N_POINTS_HEXAHEDRON
General output & CGNS defines.
void DeallocateSolution(CConfig *config, CGeometry *geometry)
Deallocate temporary memory needed for merging and writing solution variables.
string GetSurfCoeff_FileName(void)
Get the name of the file with the surface information for the flow problem.
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
virtual su2double * GetVorticity(unsigned long iPoint)
A virtual member.
virtual su2double GetSurface_CFz_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetAllBound_CD_Inv(void)
A virtual member.
Relative criteria: Res/Res0.
void SetMesh_Files(CGeometry **geometry, CConfig **config, unsigned short val_nZone, bool new_file, bool su2_file)
Writes and organizes the all the output files, except the history one, for serial computations...
virtual su2double GetSurface_CMy_Mnt(unsigned short val_marker)
A virtual member.
Definition of the finite element Reynolds-averaged Navier-Stokes' (RANS) solver.
void SpecialOutput_ForcesBreakdown(CSolver *****solver, CGeometry ****geometry, CConfig **config, unsigned short val_iZone, bool output)
Write the history file and the convergence on the screen for serial computations. ...
const unsigned short * GetSubConnType2(void) const
Function, which makes available the the connectivity of the linear elements of type 2 as a const poin...
virtual su2double GetTotal_AvgTemperature(void)
A virtual member.
Kind of Turbulent model (Spalart-Allmaras Edwards with Compressibility Correction).
virtual su2double GetGammaBC(unsigned long iPoint) const
A virtual member.
Sutherlands Law viscosity.
su2double GetSolution_Old(unsigned long iPoint, unsigned long iVar) const
Get the old solution of the problem (Runge-Kutta method)
Main class for doing the space integration, time integration, and monitoring of a system of Partial D...
Constant density gas model.
virtual void SetTotal_IDC(su2double val_Total_IDC)
A virtual member.
virtual su2double GetAllBound_CL_Visc(void)
A virtual member.
virtual su2double GetSurface_CL_Inv(unsigned short val_marker)
A virtual member.
string GetMarker_Monitoring_TagBound(unsigned short val_marker)
Get the name of the surface defined in the geometry file.
virtual su2double GetTotal_CFz(void)
A virtual member.
virtual su2double GetAllBound_CEff_Mnt(void)
A virtual member.
unsigned short GetNDOFsPerSubElem(unsigned short val_VTK_Type) const
Function, which makes available the number of DOFs of a linear element, used for plotting.
unsigned short GetKind_RoeLowDiss(void)
Get the Kind of Roe Low Dissipation Scheme for Unsteady flows.
codi::RealForward su2double
su2double GetPressure_FreeStreamND(void)
Get the value of the non-dimensionalized freestream pressure.
unsigned short GetDirectDiff()
Get the direct differentation method.
void SetSurface_TotalTemperature(unsigned short val_imarker, su2double val_surface_totaltemperature)
Set the total temperature at the surface.
void SetSurface_TotalPressure(unsigned short val_imarker, su2double val_surface_totalpressure)
Set the total pressure at the surface.
bool GetRestart(void)
Provides the restart information.
unsigned long * nVertex
Number of vertex for each marker.
void MergeConnectivity(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Merge the geometry into a data structure used for output file writing.
void SetResult_Files_FEM(CSolver ****solver_container, CGeometry ***geometry, CConfig **config, unsigned long iExtIter, unsigned short val_nZone)
Writes and organizes the all the output files, except the history one, for serial computations with t...
void MergeSolution(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Merge the solution into a data structure used for output file writing.
Derivative with respect to the angle of attack.
bool GetIncrementalLoad(void)
Check if we want to apply an incremental load to the nonlinear structural simulation.
CPoint ** node
Node vector (dual grid information).
su2double GetSemiSpan(void)
Get the wing semi span.
void SetSurface_Pressure(unsigned short val_imarker, su2double val_surface_pressure)
Set the pressure at the surface.
unsigned long offsetDOFsSolLocal
Local offset of the solution DOFs of this element.
Domain interface definition.
unsigned long GetRestart_Iter(void)
Get the restart iteration.
#define MPI_UNSIGNED_SHORT
virtual su2double GetTotal_CNearFieldOF(void)
A virtual member.
Class to define a FEM standard element.
static void Alltoall(void *sendbuf, int sendcount, Datatype sendtype, void *recvbuf, int recvcount, Datatype recvtype, Comm comm)
unsigned long GetGlobalIndex(void)
Get the global index in a parallel computation.
su2double GetTemperature_FreeStreamND(void)
Get the value of the non-dimensionalized freestream temperature.
virtual su2double GetSensitivity(unsigned long iPoint, unsigned short iDim)
A virtual member.
unsigned long GetInnerIter(void)
Get the current FSI iteration number.
virtual unsigned long GetnElemPyra()
A virtual member.
su2double GetSolution(unsigned long iPoint, unsigned long iVar) const
Get the solution.
virtual su2double GetSurface_CFz_Mnt(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_Buffet_Metric(void)
A virtual member.
unsigned short GetKind_Solver(void)
Governing equations of the flow (it can be different from the run time equation). ...
void SetSurface_MomentumDistortion(unsigned short val_imarker, su2double val_surface_momentumdistortion)
Set the momentum distortion at the surface.
su2double GetAoA_Offset(void)
Get the off set angle of attack of the body. The solution and the geometry file are able to modifity ...
const int FEA_SOL
Position of the FEA equation in the solution solver array.
virtual su2double GetTotal_CD(void)
A virtual member.
Class to define a FEM standard boundary face.
void SetSolution(unsigned long iPoint, const su2double *solution)
Set the value of the solution, all variables.
Non-dimensional compressible simulation with freestream pressure equal to 1.0.
bool GetWrt_Halo(void)
Get information about writing rind layers to the solution files.
virtual su2double GetAllBound_CSF_Visc(void)
A virtual member.
su2double GetSurface_NormalVelocity(unsigned short val_imarker)
Get the normal velocity at an outlet boundary.
static unsigned short GetnZone(string val_mesh_filename, unsigned short val_format)
Gets the number of zones in the mesh file.
bool GetFixed_CL_Mode(void)
Get information about whether to use fixed CL mode.
virtual void SetTotal_IDR(su2double val_Total_IDR)
A virtual member.
void SetSurface_IDC_Mach(unsigned short val_imarker, su2double val_surface_distortion)
Get the back pressure (static) at an outlet boundary.
Boolean definition of yes.
virtual su2double GetModVelocity_Inf(void)
A virtual member.
Definition of the discrete adjoint imcompressible Reynolds-averaged Navier-Stokes' (RANS) solver...
void SetSurface_Density(unsigned short val_imarker, su2double val_surface_density)
Set the density at the surface.
su2double GetdCMy_dCL(void)
Value of the weight of the CD, CL, CM optimization.
Upwind convective numerical method.
su2double GetTurb2LamViscRatio_FreeStream(void)
Get the value of the turbulent to laminar viscosity ratio.
vector< string > fields
Tags for the different fields in a restart file.
su2double GetSurface_Mach(unsigned short val_imarker)
Get the mach number at an outlet boundary.
unsigned long GetPoint_Max(unsigned short val_var)
Get the maximal residual, this is useful for the convergence history.
virtual su2double GetTotal_CMerit(void)
A virtual member.
CSysVector< su2double > LinSysRes
vector to store iterative residual of implicit linear system.
void SortVolumetricConnectivity(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Sort the connectivity for a single volume element type into a linear partitioning across all processo...
const int ADJFLOW_SOL
Position of the continuous adjoint flow solution in the solver container array.
vector< CSurfaceElementFEM > surfElem
Vector of the local surface elements.
bool GetBoolTurbomachinery(void)
Verify if there is Turbomachinery performance option specified from config file.
virtual unsigned long GetnDOFsGlobal(void)
A virtual member.
unsigned long GetnElem_Bound(unsigned short val_marker)
Get the number of boundary elements.
Kind of Turbulent model (Spalart-Allmaras Compressibility Correction).
virtual su2double GetVelocity(unsigned long iPoint, unsigned long iDim) const
A virtual member.
virtual su2double GetSurface_CMx_Inv(unsigned short val_marker)
A virtual member.
su2double GetTemperature_Ref(void)
Get the value of the reference temperature for non-dimensionalization.
void DeallocateConnectivity_Parallel(CConfig *config, CGeometry *geometry, bool surf_sol)
Deallocate temporary memory needed for merging and writing connectivity in parallel.
unsigned short GetnMarker_Analyze(void)
Get the total number of moving markers.
unsigned short GetGeometricConditions(void)
Geometric conditions for the structural solver.
virtual su2double GetTotal_CMy(void)
A virtual member.
Boundary Euler wall definition.
int Int(const su2double &data)
Casts the primitive value to int (uses GetValue, already implemented for each type).
unsigned short GetKind_ConvNumScheme(void)
Get the kind of convective numerical scheme.
void SortOutputData_Surface(CConfig *config, CGeometry *geometry)
Sort the surface output data for each grid node into a linear partitioning across all processors...
Definition of the finite volume heat solver.
Definition of the finite element Large Eddy Simulation Navier-Stokes' (LES) solver.
unsigned short GetKind_FluidModel(void)
Fluid model that we are using.
unsigned short GetNSubElemsType1(void) const
Function, which makes available the number of sub-elements of type 1 for plotting.
Main class for defining a baseline solution from a restart file (for output).
CPrimalGrid ** elem
Element vector (primal grid information).
su2double GetSurface_IDC_Mach(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
unsigned long GetnPoint(void)
Get number of points.
Perform all MPI communications.
virtual su2double GetAllBound_CFy_Visc(void)
A virtual member.
virtual su2double GetSurface_CSF_Inv(unsigned short val_marker)
A virtual member.
unsigned short GetVTK_Type1(void) const
Function, which makes available the type of the element in subConn1ForPlotting.
Main class for defining the problem; basically this class reads the configuration file...
vector< su2double > coorSolDOFs
The coordinates of the solution DOFs of this element.
static void Allgather(void *sendbuf, int sendcnt, Datatype sendtype, void *recvbuf, int recvcnt, Datatype recvtype, Comm comm)
void SetRestart_Bandwidth_Agg(su2double val_restart_bandwidth_sum)
Set the sum of the bandwidth for writing binary restarts (to be averaged later).
#define MPI_UNSIGNED_LONG
const unsigned short * GetSubFaceConn(void) const
Function, which makes available the the connectivity of the linear subfaces as a const pointer...
su2double * GetDistortionRack(void)
Get the distortion rack.
const unsigned int ZONE_0
Definition of the first grid domain.
void MergeSurfaceConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Merge the connectivity for a single element type from all processors for the FEM solver.
unsigned short GetiInst(void)
Get the current instance.
string GetMarker_All_TagBound(unsigned short val_marker)
Get the index of the surface defined in the geometry file.
su2double GetSurface_Temperature(unsigned short val_imarker)
Get the temperature at an outlet boundary.
const int ADJTURB_SOL
Position of the continuous adjoint turbulence solution in the solver container array.
bool GetEnergy_Equation(void)
Flag for whether to solve the energy equation for incompressible flows.
virtual su2double GetTotal_Sens_AoA(void)
A virtual member.
void SpecialOutput_Turbo(CSolver *****solver_container, CGeometry ****geometry, CConfig **config, unsigned short val_iZone, bool output)
Write the output file for spanwise turboperformance.
su2double GetSurface_DC60(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
void SetSensitivity_Files(CGeometry ***geometry, CConfig **config, unsigned short val_nZone)
Write the sensitivity (including mesh sensitivity) computed with the discrete adjoint method on the s...
BoussinesQ density model.
vector< su2double > Volume_Ratio
Measure of dual CV volume ratio (max sub-element volume / min sub-element volume).
bool GetDiscrete_Adjoint(void)
Get the indicator whether we are solving an discrete adjoint problem.
unsigned short GetnDim(void)
Get number of coordinates.
virtual su2double GetSurface_CEff_Mnt(unsigned short val_marker)
A virtual member.
virtual su2double GetGlobal_Sens_E(unsigned short iVal)
A virtual member.
virtual su2double GetAllBound_CD_Visc(void)
A virtual member.
void SetSurface_IDR(unsigned short val_imarker, su2double val_surface_distortion)
Get the back pressure (static) at an outlet boundary.
bool GetWrt_Srf_Sol(void)
Get information about writing a surface solution file.
void SetSpecial_Output(CSolver *****solver_container, CGeometry ****geometry, CConfig **config, unsigned long iExtIter, unsigned short val_nZone)
Writes the special output files.
Derivative with respect to the design??
Definition of compressible solver.
virtual su2double GetEnthalpy(unsigned long iPoint) const
A virtual member.
virtual su2double GetAllBound_CMy_Inv(void)
A virtual member.
bool GetWrt_SharpEdges(void)
Get information about writing residuals to volume solution file.
virtual su2double GetDES_LengthScale(unsigned long iPoint) const
A virtual member.
su2double GetInc_Velocity_Ref(void)
Get the value of the reference velocity for custom incompressible non-dimensionalization.
Near-Field boundary definition.
virtual su2double GetAllBound_CD_Mnt(void)
A virtual member.
const unsigned short N_POINTS_PYRAMID
General output & CGNS defines.
void MergeVolumetricConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Merge the connectivity for a single element type from all processors for the FEM solver.
Definition of the continuous adjoint Navier-Stokes' solver.
vector< su2double > Aspect_Ratio
Measure of dual CV aspect ratio (max face area / min face area).
Definition of the discrete adjoint Euler solver.
su2double GetGamma(void)
Get the value of the Gamma of fluid (ratio of specific heats).
virtual su2double GetAllBound_CEff_Inv(void)
A virtual member.
virtual su2double GetForceCoeff()
A virtual member.
unsigned short GetMarker_All_Plotting(unsigned short val_marker)
Get the plotting information for a marker val_marker.
void SetSurfaceCSV_Adjoint(CConfig *config, CGeometry *geometry, CSolver *AdjSolver, CSolver *FlowSolution, unsigned long iExtIter, unsigned short val_iZone, unsigned short val_iInst)
Create and write the file with the adjoint coefficients on the surface for serial computations...
No Roe Low Dissipation model.
virtual su2double GetOmega_Max(void)
A virtual member.
CVariable * GetNodes()
Allow outside access to the nodes of the solver, containing conservatives, primitives, etc.
Space centered convective numerical method.
virtual su2double GetSurface_CSF_Visc(unsigned short val_marker)
A virtual member.
void SetSurface_NormalVelocity(unsigned short val_imarker, su2double val_surface_normalvelocity)
Set the normal velocity at the surface.
void MergeSurfaceConnectivity(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Merge the connectivity for a single element type from all processors.
virtual su2double * GetVecSolDOFs(void)
A virtual member.
Use a time stepping strategy for unsteady computations.
su2double GetLaminarViscosity()
Get fluid dynamic viscosity.
virtual su2double GetCSensitivity(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
su2double GetdCMz_dCL(void)
Value of the weight of the CD, CL, CM optimization.
VTK nomenclature for defining a pyramid element.
bool GetFSI_Simulation(void)
Check if the simulation we are running is a FSI simulation.
No slip constant heat flux wall boundary condition.
virtual su2double GetTotal_CSF(void)
A virtual member.
Definition of the continuous adjoint Euler's solver.
short GetRotation_Type(void)
Get the type of rotation associated to the vertex.
su2double GetCp()
Get fluid specific heat at constant pressure.
virtual su2double GetTotal_CT(void)
A virtual member.
unsigned short GetnVar(void)
Get the number of variables of the problem.
Kind of transition model (Langtry-Menter (LM) for SST and Spalart-Allmaras).
Use a harmonic balance source term.
Main class for defining the Thermo-Physical Model a child class for each particular Model (Ideal-Gas...
Boolean definition of no.
bool GetFrozen_Visc_Disc(void)
Provides information about the way in which the turbulence will be treated by the disc...
unsigned short GetMarker_All_Analyze(unsigned short val_marker)
Get the plotting information for a marker val_marker.
su2double GetSurface_SecondOverUniform(unsigned short val_imarker)
Get the relative secondary flow strength at the surface.
su2double GetInc_Density_Ref(void)
Get the value of the reference density for custom incompressible non-dimensionalization.
virtual su2double GetTotal_CEquivArea(void)
A virtual member.
unsigned short GetnTimeInstances(void)
Retrieves the number of periodic time instances for Harmonic Balance.
string GetMarker_Analyze_TagBound(unsigned short val_marker)
Get the name of the surface defined in the geometry file.
virtual su2double GetSolution_Accel(unsigned long iPoint, unsigned long iVar) const
Get the acceleration (Structural Analysis).
virtual su2double GetAllBound_CMy_Visc(void)
A virtual member.
virtual su2double GetSurface_CMz_Mnt(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_Sens_Geo(void)
A virtual member.
unsigned short GetKind_HybridRANSLES(void)
Get the Kind of Hybrid RANS/LES.
Derivative with respect to the freestream density.
const unsigned short * GetSubConnType1(void) const
Function, which makes available the the connectivity of the linear elements of type 1 as a const poin...
void SortConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Sort the connectivities (volume and surface) into data structures used for output file writing (DG-FE...
su2double GetSurface_Density(unsigned short val_imarker)
Get the density at an outlet boundary.
su2double GetRefArea(void)
Get the reference area for non dimensional coefficient computation. If the value from the is 0 then...
bool GetExtraOutput(void)
Creates a tecplot file to visualize the partition made by the DDC software.
virtual su2double GetAllBound_CMx_Inv(void)
A virtual member.
void SpecialOutput_HarmonicBalance(CSolver *****solver, CGeometry ****geometry, CConfig **config, unsigned short iZone, unsigned short val_nZone, bool output)
Write the output file for harmonic balance for each time-instance.
virtual su2double GetDensity_Inf(void)
A virtual member.
void SetSurface_Enthalpy(unsigned short val_imarker, su2double val_surface_enthalpy)
Set the enthalpy at the surface.
su2double GetNacelleLocation(unsigned short val_index)
Get the defintion of the nacelle location.
virtual su2double GetLaminarViscosity(unsigned long iPoint) const
A virtual member.
bool GetEngine_HalfModel(void)
Only halg of the engine is in the compputational grid.
su2double * GetRefOriginMoment(unsigned short val_marker)
Get reference origin for moment computation.
su2double GetSurface_IDC(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
short Short(const su2double &data)
Casts the primitive value to short (uses GetValue, already implemented for each type).
static void Bcast(void *buf, int count, Datatype datatype, int root, Comm comm)
Kind of Turbulent model (Spalart-Allmaras).
string GetUnsteady_FileName(string val_filename, int val_iter, string ext)
Augment the input filename with the iteration number for an unsteady file.
unsigned long GetOuterIter(void)
Get the current FSI iteration number.
virtual su2double GetSurface_CFy(unsigned short val_marker)
A virtual member.
unsigned short GetnObj(void)
Get the total number of objectives in kind_objective list.
virtual su2double GetStrainMag_Max(void)
A virtual member.
su2double GetMax_Delta_Time(void)
Get the value of the maximum delta time.
virtual su2double GetSurface_CMz_Visc(unsigned short val_marker)
A virtual member.
void SetBaselineResult_Files(CSolver ***solver, CGeometry ***geometry, CConfig **config, unsigned long iExtIter, unsigned short val_nZone)
Writes and organizes the all the output files, except the history one, for serial computations...
su2double GetSurface_MassFlow(unsigned short val_imarker)
Get the massflow at an outlet boundary.
Non-dimensional incompressible simulation based on intial values for external flow.
unsigned short GetnMarker_ActDiskOutlet(void)
Get the total number of boundary markers.
void SetSurface_SecondaryStrength(unsigned short val_imarker, su2double val_surface_secondarystrength)
Set the secondary flow strength at the surface.
Main class for defining the PDE solution, it requires a child class for each particular solver (Euler...
Definition of the Euler's solver.
virtual su2double GetLoad_Increment(void)
A virtual member.
unsigned short GetSystemMeasurements(void)
Governing equations of the flow (it can be different from the run time equation). ...
const unsigned short N_POINTS_QUADRILATERAL
General output & CGNS defines.
void DeallocateSurfaceData_Parallel(CConfig *config, CGeometry *geometry)
Deallocate temporary memory needed for merging and writing output data in parallel.
su2double GetPressure_Ref(void)
Get the value of the reference pressure for non-dimensionalization.
Use a dual time stepping strategy for unsteady computations (1st order).
short GetMarker_All_SendRecv(unsigned short val_marker)
Get the send-receive information for a marker val_marker.
su2double GetReynolds(void)
Get the Reynolds number. Dimensionless number that gives a measure of the ratio of inertial forces to...
const int MASTER_NODE
Master node for MPI parallelization.
unsigned short GetKind_Average(void)
Get the kind of marker analyze marker (area-averaged, mass flux averaged, etc).
virtual su2double GetAllBound_CMx_Mnt(void)
A virtual member.
su2double GetFixAzimuthalLine(void)
Value of the azimuthal line to fix due to a misalignments of the nearfield.
su2double GetAoA(void)
Get the angle of attack of the body. This is the angle between a reference line on a lifting body (of...
virtual su2double GetTotal_CMx(void)
A virtual member.
unsigned long GetnPointDomain(void)
Get number of real points (that belong to the domain).
su2double GetSoundSpeed()
Get fluid speed of sound.
virtual su2double GetSurface_CD_Inv(unsigned short val_marker)
A virtual member.
VTK nomenclature for defining a triangle element.
void SetSurface_DC60(unsigned short val_imarker, su2double val_surface_distortion)
Get the back pressure (static) at an outlet boundary.
void SetSurface_SecondOverUniform(unsigned short val_imarker, su2double val_surface_secondaryoverstream)
Set the relative secondary flow strength at the surface.
Derivative with respect to the mach number.
virtual void SetHeatFluxTarget(unsigned short val_marker, unsigned long val_vertex, su2double val_heat)
A virtual member.
virtual su2double GetAllBound_CMx_Visc(void)
A virtual member.
virtual su2double GetAllBound_CL_Mnt(void)
A virtual member.
string GetMultizone_HistoryFileName(string val_filename, int val_iZone, string ext)
Append the zone index to the restart or the solution files.
string GetSurfAdjCoeff_FileName(void)
Get the name of the file with the surface information for the adjoint problem.
virtual su2double GetHeatFluxTarget(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
void LoadLocalData_IncFlow(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
virtual su2double GetRelaxCoeff()
A virtual member.
virtual void SetTotal_IDC_Mach(su2double val_Total_IDC_Mach)
A virtual member.
virtual su2double GetSurface_CEff_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CD_Visc(unsigned short val_marker)
A virtual member.
const int TRANS_SOL
Position of the transition model solution in the solver container array.
void PrepareOffsets(CConfig *config, CGeometry *geometry)
Prepare the number of points and offsets for linear partitioning that are needed for output...
unsigned short GetRef_NonDim(void)
Get the kind of non-dimensionalization.
su2double * GetLimiter(unsigned long iPoint)
Get the value of the slope limiter.
virtual unsigned long GetnElemHexa()
A virtual member.
virtual su2double GetSurface_CEff(unsigned short val_marker)
A virtual member.
Class to store a boundary for the FEM solver.
Polynomial thermal conductivity.
su2double GetNuFactor_FreeStream(void)
Get the value of the non-dimensionalized freestream turbulence intensity.
static void Allreduce(void *sendbuf, void *recvbuf, int count, Datatype datatype, Op op, Comm comm)
virtual su2double GetSurface_CFz_Inv(unsigned short val_marker)
A virtual member.
bool GetVisualize_Volume_Def(void)
Creates a tecplot file to visualize the volume deformation deformation made by the DEF software...
unsigned long GetnVertex(unsigned short val_marker)
Get number of vertices.
const su2double EPS
Error scale.
virtual su2double GetVelocity2(unsigned long iPoint) const
A virtual member.
Definition of the discrete adjoint FEM solver.
const unsigned short N_POINTS_PRISM
General output & CGNS defines.
unsigned short GetComm_Level(void)
Get the level of MPI communications to be performed.
void SortSurfaceConnectivity(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Sort the connectivity for a single surface element type into a linear partitioning across all process...
virtual su2double GetRes_FEM(unsigned short val_var)
Get the residual for FEM structural analysis.
void SetRestart(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Write a native SU2 restart file.
virtual su2double GetTotal_IDR(void)
A virtual member.
virtual su2double GetTotal_ComboObj(void)
Provide the total "combo" objective (weighted sum of other values).
su2double GetTurbulenceIntensity_FreeStream(void)
Get the value of the non-dimensionalized freestream turbulence intensity.
Derivative with respect to the sideslip angle.
su2double GetEA_ScaleFactor(void)
Get the integration limits for the equivalent area computation.
unsigned short GetnSpanMaxAllZones(void)
number span-wise sections to compute performance for turbomachinery.
unsigned short GetGeo_Description(void)
Get Description of the geometry to be analyzed.
virtual su2double GetSurface_CMz(unsigned short val_marker)
A virtual member.
VTK nomenclature for defining a prism element.
Norm of displacements with respect to target geometry.
void ComputeAirfoil_Section(su2double *Plane_P0, su2double *Plane_Normal, su2double MinXCoord, su2double MaxXCoord, su2double MinYCoord, su2double MaxYCoord, su2double MinZCoord, su2double MaxZCoord, su2double *FlowVariable, vector< su2double > &Xcoord_Airfoil, vector< su2double > &Ycoord_Airfoil, vector< su2double > &Zcoord_Airfoil, vector< su2double > &Variable_Airfoil, bool original_surface, CConfig *config)
A virtual member.
void SortConnectivity(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Sort the connectivities (volume and surface) into data structures used for output file writing...
bool GetWrt_MeshQuality(void)
Get information about writing the mesh quality metrics to the visualization files.
unsigned short GetnSpan_iZones(unsigned short iZone)
set number span-wise sections to compute 3D BC and performance for turbomachinery.
CSysVector< su2double > OutputVariables
vector to store the extra variables to be written.
virtual su2double GetSurface_CFz(unsigned short val_marker)
A virtual member.
virtual su2double GetPressure(unsigned long iPoint) const
A virtual member.
su2double GetEnergy_Ref(void)
Get the value of the reference pressure for non-dimensionalization.
virtual su2double GetSpecificHeatCv(unsigned long iPoint) const
A virtual member.
virtual su2double GetTotal_CoPy(void)
A virtual member.
su2double GetWall_Distance(void)
Get the value of the distance to the nearest wall.
Definition of incompressible solver.
virtual su2double GetGradient_Primitive(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const
A virtual member.
virtual su2double GetAllBound_CSF_Inv(void)
A virtual member.
static void Isend(void *buf, int count, Datatype datatype, int dest, int tag, Comm comm, Request *request)
bool GetViscous(void)
Determines if problem is viscous.
virtual su2double GetFSI_Residual()
A virtual member.
Running the SU2_DOT software.
unsigned short GetRef_Inc_NonDim(void)
Get the kind of incompressible non-dimensionalization.
void MergeCoordinates_FEM(CConfig *config, CGeometry *geometry)
Merge the node coordinates from all processors for the FEM solver.
string * OutputHeadingNames
vector of strings to store the headings for the exra variables
virtual su2double GetTotal_CoPz(void)
A virtual member.
double GetDerivative(const su2double &data)
Get the derivative value of the datatype (needs to be implemented for each new type).
su2double GetSurface_IDR(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
virtual su2double GetAllBound_CFx_Inv(void)
A virtual member.
bool GetWrt_Residuals(void)
Get information about writing residuals to volume solution file.
unsigned short GetnOutputVariables(void)
Get the number of variables of the problem.
CPrimalGrid *** bound
Boundary vector (primal grid information).
void SetSurface_Temperature(unsigned short val_imarker, su2double val_surface_temperature)
Set the temperature at the surface.
unsigned short GetVTK_Type(void) const
Function, which makes available the type of the element.
unsigned short GetVTK_Type2(void) const
Function, which makes available the type of the element in subConn2ForPlotting.
Kind of transition model (BAS-CAKMAKCIOGLU (BC) for Spalart-Allmaras).
Paraview binary format for the solution output.
vector< su2double > Orthogonality
Measure of dual CV orthogonality angle (0 to 90 deg., 90 being best).
string GetMultiInstance_HistoryFileName(string val_filename, int val_iInst)
Append the instance index to the restart or the solution files.
unsigned long GetNode(void)
Get the node of the vertex.
virtual su2double GetAllBound_CFz_Visc(void)
A virtual member.
static void Waitall(int nrequests, Request *request, Status *status)
static void Barrier(Comm comm)
virtual su2double GetTotal_CFx(void)
A virtual member.
su2double GetRefLength(void)
Get the reference length for computing moment (the default value is 1).
void MergeConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Merge the FEM geometry into a data structure used for output file writing.
virtual su2double GetSurface_CL_Visc(unsigned short val_marker)
A virtual member.
Definition of the discrete adjoint Navier-Stokes' solver.
void MergeVolumetricConnectivity(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Merge the connectivity for a single element type from all processors.
Definition of the discrete adjoint incompressible Euler solver.